LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-17-2010, 09:04 PM   #1
nroyb2771
LQ Newbie
 
Registered: Jul 2009
Posts: 3

Rep: Reputation: 0
help me on rsync logging


Folks,

I have a problem on logging my rsync activities. I want that the log output filename includes the date and time of the rsync activity. Every time the rsync backup, the logfilename must have date and time.

My problem is, I dont know how to do it.

Can somebody please help me on this, I am using SUSE linux as my OS


thanks

Roy
 
Old 02-17-2010, 09:19 PM   #2
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Bookworm (Fluxbox WM)
Posts: 1,391
Blog Entries: 54

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
The log file already contains date information on the files, but if you want the date/time as part of the filename, you can do something like:
Code:
rsync -a src dst --log-file="rsync.log.$(date +%Y%m%d%H%m%S)"
The $() expression will run the date command (with format YYYYYYMMDDhhmmss) to include as part of the filename.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
rsync solaris + ld.so.1: rsync: fatal: libiconv.so.2: open failed: xxx_anuj_xxx Solaris / OpenSolaris 25 02-23-2012 03:23 AM
Could I run rsync to download files from a server without rsync daemon? Richard.Yang Linux - Software 1 09-18-2009 04:08 AM
Bash script. Rsync and MSSQL errors and logging. nattflyger Programming 4 07-19-2006 08:57 AM
rsync logging ziggie216 Linux - Software 1 03-13-2005 08:42 PM
Windows Rsync Upload to Linux Rsync - permissions inspleak Linux - Software 0 10-12-2004 02:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration