On 09/29/2011 10:22 AM, Richard W.M. Jones wrote:
On Mon, Sep 12, 2011 at 01:15:21PM -0400, Mo Morsi wrote:
> This makes use of snap [1] (my Masters project from 2008), a Python
> bases system snapshot and restoration utility that uses the native
> package management system (eg rpm/yum on Fedora, deb/apt-get on
> Ubuntu, etc) to record which packages are installed on the system,
> the files not tracked by the package management system, and the
> files which have been changed since installation by the package
> manager
Interesting project!
I looked at the code and tried to run it on a Fedora 16 VM. It didn't
work ("ERROR: Error instantiaing package system" -- apparently because
the yum API has changed/broken since it was written).
Ah yes that is a good possibility.
I have some questions about it ...
(a) How well did it work in practice?
It actually worked pretty well, I was able to record the packages and
files on one system and then migrate them to a new system simply by
using Snap.
(b) Do you save and restore non-file items, for example:
- bootloader configuration
Hrm you're referring to all the stuff saved in /boot? I didn't
explicitly verify that but I'd imagine it should work out of the box as
is since those are just files on disk.
- filesystem options
Can you elaborate? The stuff in /etc/fstab? The file should be copied
over but do you know if there would be any nuances after that?
- partition layout, swap and LVM configuration
It didn't cover this as the snapshot / restoration occured at the
filesystem level. That being said, I would like to expand the project to
encompass a plugable architecture, where we could register plugins for
things that we would like to take snapshots of.
Then the current packages / files stuff would be a single plugin and we
could have plugins for partitions, services, etc.
- extended attributes and ACLs for changed files
If I recall correctly, Snap handled all the ACLs, but if not I can't
imagine this would be that hard to add and restore in the snapshot.
(c) I'm interested in making this a virt tool that could work on
guests, using libguestfs. We already have virt-inspector which
operates in the same area[2]. Is this something you're interested in?
I'm thinking this could generate descriptions of machines as a first
step. A second step might be to transform these into kickstart files
or puppet manifests.
Rich.
Sure, will be starting to refine the project as soon as I get some
cycles to do so. Perhaps we can coordinate from there to meet both our
needs.
Take care,
-Mo