Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 2 down vote accepted

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.

share|improve this answer
-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

You must log in to answer this question.

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