rsync – I’m doin’ this tonight, You’re probably gonna start a fight.

Written by James McDonald

September 11, 2013

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/



Submit a Comment

Your email address will not be published.

You May Also Like…

MacOS USB Creator

Just toasted my Windows 10 Pro install with a Windows 11 upgrade. Think it will be unrecoverable (because of Bitlocker...