Using rsync over ssh...
Yesterday I had to grab a directory of scripts I've been developing to do a scripted restore of our ERP environment and place them on a new server making sure I deleted anything that wasn't in the remote directory:
Remote to Local
# logged in to the local box cd /u5/restore mkdir scripts # be careful with --delete option as it will delete # from the target (local) anything # that doesn't match remote rsync -avz --delete -e ssh erp-qad04:/u5/restore/scripts/* scripts/
Today I've made changes and wanted to make sure the remote server has the local changes:
Local to Remote over SSH
# logged into the local box rsync -av -e ssh scripts/* erp-qad04:/u5/restore/scripts/
0 Comments