I'm using rsync on my Ububtu Linux server to take a time machine like backup of the system. Every hour, a cronjob runs the following script (partial excerpt):

rsync -a --link-dest=/backup/current --delete-excluded
      --exclude-from=/root/bin/backup.exclude / /backup/$date
rm -f /backup/current
ln -s /backup/$date /backup/current

$date has the file name in the format yyyymmddhhmm

I'm finding the backup volume (/backup) is filling at a much higher rate than I might have expected. What I'd like to do, is be able to produce some kind of report every hour when the script runs, that lists the files that where modified.

Does rsync have the capability of doing this, or if not, can you suggest a method of producing the report, maybe by parsing all the files in the directory $date and listing any file which only has a single hard link associated with it.

I'm not looking for any kind of formatted report, just a simple text file listing modified files.


Consider using the following rsync options:

-v to increase the verbosity

-i to itemize changes

If you want to see the changes before syncing, you can use the above options with the -n option to do a dry run.

  • -i, perfect, thanks. It's amazing how many changes are made to various files in a short period of time. I think my backup.exclude file is about to grow. Thanks again. – Bryan Jan 30 '12 at 23:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.