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

I'm using reprepro to maintain a Private Package Archive of internal packages. There is no straightforward way to keep multiple version of a package available using reprepro (see here), but it does have a snapshot facility that sort of works.

But only sort of. I don't see a good way to go back to a snapshot version. There is a command restore documented, but it doesn't seem to work (reprepro version 4.8.2 on Ubuntu 12.4.1 LTS).

I can access the snapshot via apt-get as described in the man page, by editing sources.list to include something like

deb method://as/without/snapshot codename/snapshots/name main

but this means I need to update all the servers with a new sources.list to change their snapshots.

What I'd like to do is maintain a "safe" distribution that I can configure from any snapshot on "stable" and always have servers pull from "safe". Then to do a rollback I just roll back "safe" and have the servers remove and re-install the packages. (I say remove and reinstall because it seems too hard to get them to downgrade just the private packages without touching the public packages.) Or something like that.

The main goal is to have an automated way to get a server farm to revert to an older version of the packages. I'm open to suggestions.

How are people handling this? Is there a way to get reprepro snapshots to work the way I'd like?

share|improve this question
1  
So I am guessing the unstable packages are not listed when you run reprepro dumpunreferenced? –  chrishiestand Mar 10 '12 at 0:30

1 Answer 1

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.

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.