rsync Drupal files directory for staging site

If you have a live site and a stage (or dev) site, you will probably want to add any new files (such as images) from the files directory on the live site to the staging site, or vice versa.

Run this rsync command, assuming you have navigated to the root Drupal directory (such as public_html). This also assumes that your stage site is located in the stage directory.

-r recursive - will include subdirectories
-v verbose - will display the files on the screen as they move

rsync -rv sites/default/files/ stage/sites/default/files/ 

Post new comment

The content of this field is kept private and will not be shown publicly.

Learn how to become a Drupal developer

Does Drupal development make your head explode and drive you crazy?

Why not learn from someone who has paved the way instead?

Sign up to my upcoming learning series.

Syndicate

Syndicate content

Hello!!

I am Blair Wadman and this is where I write about Drupal, PHP, CSS etc

Stuff

© Blair Wadman
2005 - 2011