Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
OK, let's also have a look at this…. – Paolo Nov 3 '14 at 20:55

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
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


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.