0

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.

1 Answer 1

2

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.

1
  • -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, 2012 at 23:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .