LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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, 10: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, 10:19 PM   #2
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Jessie (Fluxbox WM)
Posts: 1,387
Blog Entries: 52

Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 04:23 AM
Could I run rsync to download files from a server without rsync daemon? Richard.Yang Linux - Software 1 09-18-2009 05:08 AM
Bash script. Rsync and MSSQL errors and logging. nattflyger Programming 4 07-19-2006 09:57 AM
rsync logging ziggie216 Linux - Software 1 03-13-2005 09:42 PM
Windows Rsync Upload to Linux Rsync - permissions inspleak Linux - Software 0 10-12-2004 03:49 PM


All times are GMT -5. The time now is 10:26 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration