Backups of my VPS to home pc or FTP
10 Replies
rsync and its family (rdiff-backup, rsnapshot) are capable of backing up only those files that changed since the last backup, so you don't need to transfer all the files over and over again. This makes it more feasible to perform daily or weekly backups, instead of monthly. Problem: rsync doesn't work on Windows unless you mess with cygwin, which is a rather delicate business.
Another popular backup option is Amazon S3. Command-line tools such as s3cmd (with the "sync" option), combined with some shell scripting and cron, would give you automatic backups to S3. I back up one of my sites using this method, twice daily.
Backing up the database is as simple as producing a database dump (e.g. mysqldump) and including the dump file with your regular backup.
So there practically is no solution to backup my linode to windows?
Anyhow, you can rsync home at a regular basis, or use something similar like hybinet mentioned.
Personally, I have a fileserver running Solaris with ZFS. Every night, my server logs in to my linode and syncs all the data down, and then does a ZFS snapshot. The result is nightly incremental backups with trivial access to any one of them; ZFS lets you access snapshots by simply entering a virtual directory for the snapshot without executing any command; just a "cd" right into the snapshot. It's fun.
Of course, there's the whole OpenSolaris-is-dead issue…
You can run rsync on Windows if you install cygwin. But you have to use it in a special command prompt (very inconvenient), and Windows doesn't preserve file and directory permissions so you might need to make adjustments if you ever need to restore your backup.
Or you can install Linux on Windows, using VirtualBox. Then you can do whatever you want on your own virtual Linux computer.
> ZFS lets you access snapshots by simply entering a virtual directory for the snapshot without executing any command; just a "cd" right into the snapshot. It's fun.
You can do something similar in Linux too, if you use btrfs. But it's still experimental.
@hybinet:
You can do something similar in Linux too, if you use btrfs. But it's still experimental.
I do hope that one day, btrfs can replace zfs, but at the moment there are a few concerns:
1) As you said, it's experimental
2) It's not clear from documentation for btrfs (since there isn't any), but it looks like accessing a snapshot in btrfs involves unmounting the current filesystem and remounting it with a different subvolume. This makes it useless for most use cases, because I have to reboot a machine just to grab some data from a snapshot of the boot drive, or take my whole storage array offline just to grab some old files. Even if you don't have to unmount it (perhaps you mount the volume read-only?) it's a lot more complicated. Hopefully this gets resolved, but this complaint may just be the result of btrfs being poorly documented
3) It's developed by the same people making ZFS, and I'm cautious as to why Oracle is doing both ZFS and btrfs at the same time
Issue 1 will undoubtedly be resolved. Issue 2 will hopefully be resolved, even if it's only done by automated tools that take care of everything automagically. Issue 3 is a concern, but it's GPL'd, so…
Hopefully I can move to btrfs some day.
Keep in mind that backing up to home means restores are going to take a very long time. But it's better than nothing, especially if it's just a part of a complete backup plan.