HELP! Rsync deleted the source files!
I have a major issue with rsync. Preface:
2 servers, with Centos 5-x86_64.
/home on server1 is full of data (100GB).
/home on server2 was empty.
I used rsync to initially copy them to server2, with the following options: -avz --delete
The complete command was:
/usr/bin/rsync -avz --delete /home/ root@server2:/home
The only other difference between the 2 servers was the timestamp (server 2 was late by 5 minutes).
The result was the data loss on server1. Nothing copied on server2! WHY?
Sorry, but I very much doubt that the problem is with rsync.
There's either user-error (kicked it off on the wrong machine?)
or maybe a faulty DNS (or /etc/hosts) set-up (which of course again
is user error).
That all said: if you don't have a recent back-up, or a file-system
like ext2 which allows for reasonably easy recovery, there's not
much you can do in this situation.
Never use the --delete unless you are absolutely sure. And from the looks of it, you're trying to mirror server 1 to server 2. There's really no reason to delete the source files. The only time I use --delete is if I'm doing it with some backup type script, not the original files but already backed up files, etc.
Actually rsyncs delete NEVER operates on the sending
machines side, always on the receiving. It doesn't even have
an option to be deleting stuff of the sender.
Too bad. Anyway, thanks for the reassurance that the deletion was not done by rsync.
|All times are GMT -5. The time now is 01:36 AM.|