I'm having problems doing backups with rsync.
Using Debian Lenny
When I use the following script rsync deletes directories in
/mnt/backup: debian and home and syncs the /home directory with
/mnt/backup. I want to do incremental backups in
/mnt/backup/debian/home. this is the script I'm using:
Quote:
#!/bin/bash
mount /mnt/backup
cd /mnt/backup/debian/home/
rm -rf backup.7
mv backup.6 backup.7
mv backup.5 backup.6
mv backup.4 backup.5
mv backup.3 backup.4
mv backup.2 backup.3
mv backup.1 backup.2
mv backup.0 backup.1
cd /
rsync -av --delete --exclude-from='/root/scripts/exclude-files' --delete-excluded \
--link-dest=/mnt/backup/debian/home/backup.1 \
/home/ /mnt/backup/debian/home/backup.0/ \
umount /mnt/backup
|
when I use this script with the -n option rsync renames the file:
It renames backup.0 to backup.1. Isn't the -n option
supposed to be a dry run; why is it changing things?
Thanks