Using sftp over ssh, and tar
As a WordPress user, most stuff I add or update towards my site content—pictures, themes, plugins—typically gets stored in wp-content; so this is a mighty important folder when it comes to backing-up. Here’s how I backup wp-content (as an alternative to rsync):
I login to my site via ssh, and navigate to the root of my WordPress installation, and run tar to archive (zip) the entire wp-content folder:
$ tar -zcvf allwpcontent.tar.gz wp-content/
This above creates a file named allwpcontent.tar.gz.
Now still over ssh, I start sftp and navigate to the root of my WordPress installation (again). From there, I download the zipped file:
sftp> get allwpcontent.tar.gz
Downloading the entire wp-content by zipping (or tarring) first is so much quicker than downloading the entire folder—file by file; and easy too.
