Skip to main content

Recursive Copy from one Server to Another

Using SCP is a great way of copying files between remote servers where you have limited options for transferring via GIT or similar.

Here is a simple snippet that assumes you have logged into the master server that will be used as the source for files and folders:

scp -r /var/www/public_html/* [email protected]:public_html/

A similar approach can also be used with Drush for Drupal:

drush rsync @source:%files @target:%files

Looking for Expert WordPress or Drupal development?

I am a freelance website developer and designer based in the UK. I work as a remote Drupal developer, WordPress developer and Front-end developer for a variety of startups, charities and international businesses in Bristol, Bath, London and Europe. You can learn more about me by visiting my resume page.

Get in touch for a free quote on your next project and if you want to connect me with then check out my LinkedIn profile.