Tell me more ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I've created a backup script with rsync and I have it running every 10 minutes. I have it logging using --progress but to make reading the log easier I only want to include files that are transferred. I.e. at the end of a run I would like to see something in the log like:

Started transfer at 2012-07-31 11:03:45

/some/file/that/was/changed.txt
/another/file/that/was/added.jpg

Number of files: 35184
Number of files transferred: 2

I can't find anything after a bit of googling. Is there a way to do this?

Thanks.

share|improve this question
Have you tried using --stats instead of --progress? – scai Jul 31 '12 at 10:36
Yeah but it doesn't state which files were transferred. – jeanaux Jul 31 '12 at 11:03
1  
I've noticed that the reason it was listing everything is because I was using the -a flag. I changed it to -tr because I'm rsyncing to fat32 and the other options of -a don't really matter. It seems to only print the progress of transferred files now rather than all of them. I don't know why this works but I suspect that it's because fat32 can't store some aspect of the file (like it does with timestamps) and rsync thinks it needs to be updated a second time when it looks like the file is different. – jeanaux Jul 31 '12 at 11:24
@jeanaux Please add more information to your question, such as a simple log, and the fact that your target filesystem is fat32 (using a non-native filesystem is an important piece of information). Then answer your question, ideally mentioning which particular aspect was causing the problem if you can find out. – Gilles Jul 31 '12 at 22:41

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.