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/

 

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

You May Also Like…

Network speed test host to host

On Ubuntu / Debian apt-get install iperf3 On Windows download it from https://iperf.fr/iperf-download.php#windows Make...

Clear HSTS Settings in CHrome

Open chrome://net-internals/#hsts enter the domain in the query field and click Query to confirm it has HSTS settings...