Weblog Archive

Site backup using rsync over ssh

Wed, 30 Jan 2008 at 21:49 • Chyetanya Kunte • Filed under Blog, Linux, Server side

I use rsync over ssh to backup files—including my entire WordPress installation—from my site to my local machine (and back). Having these tools natively in Ubuntu makes it a lot easier—not to mention similar file paths on both local machine as well as on my webhost. Here’s how I do it.

This to backup1 all files from my site to my local machine:

rsync -avz -e ssh remoteuserid@mysite.com:remotepath localpath

And from my local machine to my site:

rsync -avz -e ssh localpath remoteuserid@mysite.com:remotepath

remotepath would be something like this: /home/remoteuserid/public_html, and localpath would be like this: /home/localuserid/backup/public_html.

Damn it’s fast.

  1. I don’t do a cron job of a file backup and restore—I get knots in my stomach. Call it personal preference, but I prefer it manual; and this is mostly because of my file-scatter, and the state of my files, which are usually in various levels of edit—at any given point of time. []

, , ,

[ Ads ]

Related posts

Following list is auto-generated, based on this post's context as possibly related. You may, however, occasionally find some in this list unrelated, but nevertheless, we sincerely hope that you'll enjoy them too.

Respond privately

Comments are closed, but you may respond privately to “Site backup using rsync over ssh.” (Your response will not be published.)