Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

This is similar to my last question except that my last question included "while running" in the title. I've since learned that this isn't exactly possible.

Here is my understanding of the options (when using LVM for the file system backing).

1.)

Process: Shut down the domain. Create a LVM snapshot. Bring the domain back up. Create a backup from the snapshot. Destroy the snapshot.

Pros: Perfectly consistent backup.

Cons: Obviously, the drawback of this method is that the domain needs to be rebooted every time a backup is performed.

2.)

Process: Run 'xm save' on the domain. Copy the image file and the state file. Run 'xm restore'.

Pros: Less downtime than #1.

Cons: Still "some" downtime plus network connections will be lost. Also, the image will still not necessarily contain a perfectly consistent file system, BUT along with the state file, a consistent image could be created. (We'd be backing up the machine state, memory contents, etc. at the same time.)

3.)

Process: Create an LVM snapshot. Create a backup from the snapshot. Destroy the snapshot.

Pros: No system downtime.

Cons: Backup would be as if the power cord were yanked from the machine, then the drive removed and copied.

4.) Backup from within the domain by whatever process you normally use.

Am I missing or misunderstanding anything?

share|improve this question
    
so which option and tools did you end up going with? –  Gaia Nov 29 '11 at 20:01

2 Answers 2

up vote 2 down vote accepted

Nope, those are pretty much your options. But I think you're overstating the problems of option (3), because in general that's what backups are anyway -- you can't guarantee that the copies you make of any file in the filesystem would be comprehensible to any process that uses it (for instance, if you copy your MySQL data directory while MySQL is running, MySQL may not be able to read those files again on restore).

The only additional concern with option (3) over doing an in-domain backup is that the filesystem won't necessarily be in a fit state to be read; in my experience, that isn't something that happens much (especially when you're backing up in the wee hours), and can be mitigated with an fsck check before you backup. In-domain backups are still the best way to go, IMO.

share|improve this answer
    
Ex2 and ext3 are known to loose a lot of consistency with long fsck/recovery times. What file systems are better suited for such "power cord yanking"? Reiserfs, ext4, xfs? –  myroslav Dec 23 '09 at 9:30
    
ext3 doesn't have long recovery times, in my experience. –  womble Dec 23 '09 at 21:28

I pretty much agree with womble. I would add that option 1 doesn't necessarily bring downtime. If you have some sort of redundancy, this option will be the best. Not having such redundancy means any software problem will take down the service and will mean bad uptime.

I think you should consider option 1 with a little redundancy =)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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