Rsync can be do some pretty destructive stuff you never intended if you are not careful.

what mistakes have you done while using rsync?

Let's keep to one mistake per answer.

link|improve this question
feedback

4 Answers

Rsync has the -n option, which is for dry-run. This means it shows you what it is going to do, without actually doing it. Most mistakes (but not all) can probably be summed up into:

"Forgot, or was too lazy, to use the -n switch for a dry run first"
link|improve this answer
feedback

Backups before reinstalling two machines:

rsync -a --delete server1:/data/ /backups/server1/data/ &

in another window

ssh server1 halt

in the original window

rsync -a --delete server1:/data/ /backups/server1/data/ &
OOPS, it hangs because server1 is down now. forget to kill it. run:
rsync -a --delete server2:/data/ /backups/server2/data/ &

reinstall server1, restoring IP address and ssh config. The second rsync to server1, hung for the last 15 minutes, comes to life and deletes the backup.

link|improve this answer
feedback

Running :

rsync --remove-source-files --delete /src/ /dst/

twice on the same source/destination. Goodbye files. Now, where is last night's backup?

link|improve this answer
feedback

I just rsynced between a source and destination. the mistake is however, put the src and dest in the wrong order. ARGHHHHHHH

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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