On 30/03/11 19:22, Chris G wrote:
I'm aiming to use rsync's --link-dest option to do some incremental backups but I'm not absolutely sure I've got its use correct.
What I'm going to do is maintain incremental backups for the last seven days, so they'll be in directories named for the days of the week. The script will work out values for today and yesterday and then do (example for today):-
rm -fr /backup/Wed rsync -a --link-dest=/backup/Tue fromSource /backup/Wed
Will this do what's intended? I'm less interested in detailed syntax errors but want to be sure I will get 7 days of incremental backups.
I think you will find it faster to not do the rm -rf and use --del as one of the rsync params. Then it will only remove what it needs to remove.
(I am not an expert).