adding system snapshots to ubuntu standard install

Christofer C. Bell christofer.c.bell at gmail.com
Sat Aug 19 05:50:12 UTC 2006


On 8/18/06, nijhawank <ulist at gs1.ubuntuforums.org> wrote:
>
> basically what i intend to do is that i freeze my system state at some
> point in time. after this whatever i do to the system is recorded as a
> delta somewhere else.

I don't know if this addresses your concerns, as it doesn't handle
configuration changes, but I simply save the current state of the
selections list whenever I want to take a "snapshot" of installed
software.  To take this snapshot at install time, the first thing you
do when you login to your new Ubuntu system is to save a list of the
installed selections:

$ dpkg --get-selections > installed-selections.txt

Any time you want to take a snapshot, you can run a similar command:

$ dpkg --get-selections > `date +%Y%m%d%H%M%S`-selections.txt
$ apt-get install lots of software I want to try out

When you want to restore your system to a previous snapshot, "I didn't
like using the lots of software I want to try out", (I'll use the "as
installed" one in this example) you can simply apply a previous list
of selections and run a dselect-upgrade:

$ dpkg --get-selections > current-selections.txt
$ sed -i s/install/purge/g current-selections.txt
$ dpkg --set-selections < current-selections.txt
$ dpkg --set-selections < installed-selections.txt
$ apt-get dselect-upgrade

This will purge all the software that was installed after the the
"snapshot" selections list was saved, and restore the system to the
saved list of software selections.

You can use any of your previous "snaphots" in place of the
'installed-selections.txt' selections list.  If you want to retain
configuration files, you can use "remove" rather than "purge" when
resetting your selections list.

Again, this does not address your question directly, and does not save
changes to configuration files (your method doesn't seem to do that,
either), but does allow you to take manual "snapshots" of your
installed software, which does seem to be a goal of what you're doing.

-- 
Chris

"I trust the Democrats to take away my money, which I can afford.  I
trust the Republicans to take away my freedom, which I cannot."




More information about the ubuntu-users mailing list