rsync question
Hi
i am a bit confused first i have a nas storage device and a external hard disk i mounted the storage device on /mnt and the external hard drive on /media/disk my goal is to copy from the storage device to the external hard disk so i did rsync -vac --stats --delete /mnt/ /media/disk/fileserver-backup/ and this was the out put i was getting deleting mnt/Contacts/Clients/............. deleting mnt/Contacts/Clients/............... deleting mnt/Contacts/Clients/............... deleting mnt/Contacts/Clients/................ deleting mnt/Contacts/Clients/............ deleting mnt/Contacts/Clients/............ deleting mnt/Contacts/Clients/.............. deleting mnt/Contacts/Clients/.............. deleting mnt/Contacts/Clients/........... deleting mnt/Contacts/Clients/........... deleting mnt/Contacts/Clients/.......... deleting mnt/Contacts/Clients/.......... deleting mnt/Contacts/Clients/.......... that is just part of the output before i stopped it also the ...... is for security reasons my question is why is it deleting the stuff on the storage device when the command stated rsync [OPTION...] SRC... [DEST] if it isnt deleting what is on the storage device what is it deleting |
--delete will delete files from the SENDING side.
what are you trying to do EXACTLY. i.e. are you trying to: Clone a directory/filesystem? or Create a set of one-off backups? or Create incremental backups? |
i was trying to back up the file on the storage device to the external drive
the external drive had a copy of the backups but it was about a few weeks old so i was trying to update it so i can work on the storage device |
No, --delete deletes at the destination. What's happening is rsync compares what you are sending with what's there and because you have the delete option is cleaning up.
|
From man rsync
Quote:
|
So basically it was not deleting my files because it cause me quite a scare and also i checked for the files there were still there but from the out put that was the folders it was supposed to be deleting anyway thanks for you help next time i will definitely use a dry run first
|
All times are GMT -5. The time now is 10:04 PM. |