Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

If I am doing backups from LVM snapshots of a live system, how can I best avoid problems due to the snapshot being taken during things like upgrades? Presumably this wouldn't be catastrophic, since it would be less serious than a power outage during the upgrade, but it could cause at least some amount of inconvenience.

share|improve this question

1 Answer 1

Don't start a backup while you are also doing an upgrade. If you are doing both via a cron script, then have both scripts use a lock file or something to make sure they do not run at the same time, or schedule them far enough apart that the first one should be done before the second starts.

share|improve this answer
1  
I guess I could get my backup script to try to mv -n some file to the location of the APT lock file, and rm it after the backup is done. Though I'm kind of hoping that there is a backup tool or toolkit that will take care of these sorts of complications, since I don't feel like I will be likely to catch all such possibilities. There are also things like installs for various languages, and probably some things I haven't thought of (the "unknown unknowns" :S –  intuited Feb 16 '11 at 15:26

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.