RSYCN Help
I am trying to sync two servers on my LAN as a backup and was wondering if I am running the correct command. The production server is "server-1" and the backup server I am copying everything to is "server-2".
I basically just want any changes made on server-1 to be copied to server-2 including if a file is removed / changed from server-1, it should mirror to server-2. Is this command correct to be ran from "server-1"? Code:
rsync -ave ssh --stats --delete-after /share/ctia/share/ root@10.1.1.29:/ctia/LT2FS1 |
It should probably be run as root, so you won't need the root@.
Code:
/usr/bin/rsync -ave ssh --stats --delete-after /path/to/directory server-2:/path/to HTH Forrest |
Yes,
my command is placing the items in the right place so all looks well. I made a new file in server-1 and ran RSYCN and it shows up on server-2. I then remove it from server-1 and next time I run the command, it is no longer on server-2. Exactly what I want. Now my only question is if there is a difference in the command --delete-after and --delete? |
All times are GMT -5. The time now is 09:30 PM. |