rsync help for deleting files after sync

Posted On // Leave a Comment

Hi, I have been using rsync for a while to transfer backup to remote server , however today I noticed that DESTINATION is also keeping files those are deleted on SOURCE.


Say SOURCE had files



1.sys 2.sys 3.sys 4.sys



Then it was rsynced with DESTINATION , now both have similar files..


However issue is coming when : I deleted 2.sys and added 5.sys and 6.sys, then on SOURCE It will be



1.sys 3.sys 4.sys 5.sys 6.sys



When rsynced with DESTINATION, it now contains all :



1.sys 2.sys 3.sys 4.sys 5.sys 6.sys



But I want to delete the files those are also DELETED on SOURCE: I am using following command with --delete parameter.. still no luck: rsync -avzh -e 'ssh -p 8011' --delete --progress user@SOURCE:/home/all-bacups/* DESTINATION/dir


Is it something I am missing ?


http://ift.tt/1dvHQ0Z

0 comments:

Post a Comment