Every time I have to do a huge update to an application (in this case a web one), I use to make a backup (just “an image”) of that.
I use sitecopy for updating sites and it’s a great and powerful tool. Making a simple image of the remote server on the local machine is very easy but I always forget how to do it, so I’m writing it down.
First of all make a local empty directory in order to hold the downloaded file and then configure sitecopy for using that directory. An example of configuration can be found in a previous post.
For naming the site I use something like the following criteria. Let’s say that we want to manage the http://www.example.com server, as site in the .sitecopyrc file I use http://www.example.com for the directory I use for synchronizing (updates, patches): generally the stream is from local to server. I use fech.www.example.com for the backup the stream should be server to local.
Once configured it’s simple
sitecopy -f fetch.www.example.com
sitecopy -s fetch.www.example.com
I’ve noticed that the version of sitecopy under cygwin has a bug (maybe it’s not a bug and maybe it’s not only the cygwin version): when downloading the files, with the -s comman, it will hang up with errors on creating subdirectories. You will need to execute the command more times; one for each inner directory.