Recovering from a borked reprepro pull [duplicate]

I'd do this by using an LVM logical volume backing the repository. It's probably best to put this on a separate filesystem than root anyways. Steps to do this would be:

  1. If LVM is not installed, install and configure it.
  2. Create a logical volume for your repository.
  3. Format with filesystem of choice.
  4. Mount in appropriate location.
  5. Move repository onto it.

At this point, you can trivially snapshot the entire repository by creating logical volume snapshots. If desired, you could just set up rolling snapshots nightly.

If you're feeling particularly daring, you could use filesystem-level snapshots with BTRFS or ZFS, but those are both less mature on Linux at the moment.

  • The Reference: http://www.tldp.org/HOWTO/LVM-HOWTO/
  • A Less Verbose Guide: http://www.thegeekstuff.com/2010/08/how-to-create-lvm/