1

I usually backup from server1 files to a server2 machine by doing the following in server1

rsync --progress -avhe ssh www/ user@10.10.10.10:/home/user/www

What I'm looking for is to completely synchronize files on server2 based on what is currently on server1. I know that there are several extra files on server2 that probably I want to remove.

How could I perform this using rsync?

Thanks

4

rsync has a --delete flag: http://www.manpagez.com/man/1/rsync/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy