SUBSCRIBE VIA RSS


Subscribe to our feed

Symfony Experts

Symfony Experts
If you have an urgent question for a symfony-related issue, this is the place to ask.

Topics

Stack Overflow


The old fashioned way

RECENT TUNES

August 28, 2008 – 11:40am Using rsync to synchronize local and remote directories

When our design team is done with an html / css design, they upload it to a webserver for the client to review. Once it’s been approved, it’s time for the developers to download the static site and start integrating it into the php application. To pull down the site files, FTP does the job just fine, but invariably there will be changes made to the template even after it’s been approved. Or, perhaps the developers want to start on a few pages that have been finished before every page has been coded into html. A nice way to pull down only the latest files changed by your designers, making sure to get any related images or css files, is by using rsync.

Here is what works for us:

rsync -avcn -e 'ssh -p [ssh port number]' [user]@[your remote domain]:/home/[user]/[your remote template path]/ [your local template path]

This will do a dry-run, meaning it won’t actually copy any files, but it will show you what it would have done. When you are ready to go for it, remove the “n” from “-avcn”, and you’ll automatically pull down any files that have been modified on the remote server.

Posted by in  Web Development   |  

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>