Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


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

Rep: Reputation: 0
help me on rsync logging


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


Old 02-17-2010, 10:19 PM   #2
Senior Member
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Buster (Fluxbox WM)
Posts: 1,390
Blog Entries: 52

Rep: Reputation: 359Reputation: 359Reputation: 359Reputation: 359
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:
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.


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 + rsync: fatal: 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 > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:27 PM.

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