3

I have a VPS with linode and they have hot backup of running system.

I have multiple times restored the image when I do something stupid or mess up some install etc

How do they do live hot backup , how can I do it on my local linux machine or Mac ? I know rsync or dd but it takes so much time and I am not sure about dd image integrity ? Do they use some weird raid?

How do you guys back up your live MySQL or business production system ?

2

Linode in particular uses a custom agent in the host OS to back up at a file level. (Linode does some crazy iSCSI stuff that most of us mere mortals will never mess with.)

A more widely-used solution is LVM's "snapshot" target (sample write-up here) which is more or less good at hot backups. Basically, if you're using Logical Volume Management, you can tell the system to make a copy of one of your volumes (say, the one mounted as /var) to a currently-unused volume. (YMMV; caveat emptor; void where prohibited -- in particular you'll have the usual snapshotting problem if there's rapidly changing data)

In fact, because of that problem, databases in particular are usually backed up through some kind of log shipping rather than snapshots at a given moment (I don't know MySQL/MariaDB that well, but I DBA both Postgres and Oracle sites and that's how we always do it). Basically your servers keep track of all their transactions, and pretty steadily report those to a non-public backup server, which records them (think "replication but with a lot more tolerance for latency"). This way you have more control over how far you need to roll the database back than if you just, say, take a nightly snapshot (though DBAs are paranoid enough that we often do that too).

Personally, for my development machine at home, my solution is just to use a good version control system (I like git) for all of the directories I care about and once in a blue moon tar them off to the cloud or an external hard drive or something; since I rarely actually blow up the system itself (I more often do something stupid with my own files) it's all I've ever needed on a local machine.

1

A common backup software solution used by hosting providers is the Idera CDP suite, which uses the hcp (hot-copy) utility to take point-in-time snapshots without LVM/ZFS/btrFS, etc.

The hot-copy tool is available for free.

Please also see: CentOS Hot Backup

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.