melopsittacus
December 26th, 2008, 04:15 PM
Hello!
I am looking for a solution to back up my working environment on a custom install CD from which I can reinstall it quickly and easily in case of crashes. I thought I would make a copy of the system about once a month onto a CD. I intend to back up only the operating environment: my data and work is stored on a separate partition (accesible through /media/somedir), and I would back it up in another way (because it is much more large and would not fit on the CD of the working environment).
The needed requirements are the following:
- keep EXACTLY the installed packages:
there are some packages on the default install CD that I do not need, but there are some packages installed later that are needed
in addition not all packages are installed from the official repository: some were available only as .dpkg and were installed manually
- keep the installed version for each package:
so that there is no need to do any upgrade in case of reinstall
- keep custom configuration and settings for each package:
for instance the /etc/* and /home/USERNAME/.* files
- do not store any unnecessary files:
for instance contents of /tmp
The question is, which is the best approach to achieve this?
Those I found so far are the following:
- mirror the contents of the system partition with dd command (perhaps excluding the unneeded directories)
disadvantages: uses a lot of space, and maybe I am not able to correctly guess the needed items (there may be unneeded items other than /tmp)
- get the list of currently insatalled packages (sudo dpkg -get-selections > packages.txt) and invoke dpkg with those packages (sudo dpkg -set-selections)
disadvantages: it does not save the packages themselves, only a list of them, so that I would actually need to redownload them which may take a lot of time; it does not save custom settings and this solution does not deal with packages added "manually" (through dpkg -i <packagename.deb>) -- of course these packages would appear in the list, but they would not be available for install as they are stored locally
- use a special utility (called remastersys) to clone an existing installation
this seems the best solution so far, however:
it has been reported not to work correctly in some cases (see: http://www.ubuntu-unleashed.com/2007/09/remaster-and-clone-your-ubuntu-install.html) -- it does not save the restricted drivers of nvidia, and it does not cope with Hardy.
To summarize, my question is the following:
Is there a tool like "remastersys" but working absolulte correctly with Intrepid Ibex (or Hardy)?
Or is there a better way to make working environment backup than those I have found so far?
------------------------------------------------------------------------
Other question:
The system is set up on an encrypted partition. I do not think there is a way to automatically restore the system within the encrypted partition other than copying the whole partition with dd.
So the reinstall process would look something like this:
- recreate the encrypted partition and encrypted swap manually
- install all the packages from the custom install CD
For this purpose I would need to create a custom install CD like the "Alternate Installation CD"
However if this is not possible, I am ready to do without encryption and just create an install CD like the "Normal" one.
Thanks for any help
I am looking for a solution to back up my working environment on a custom install CD from which I can reinstall it quickly and easily in case of crashes. I thought I would make a copy of the system about once a month onto a CD. I intend to back up only the operating environment: my data and work is stored on a separate partition (accesible through /media/somedir), and I would back it up in another way (because it is much more large and would not fit on the CD of the working environment).
The needed requirements are the following:
- keep EXACTLY the installed packages:
there are some packages on the default install CD that I do not need, but there are some packages installed later that are needed
in addition not all packages are installed from the official repository: some were available only as .dpkg and were installed manually
- keep the installed version for each package:
so that there is no need to do any upgrade in case of reinstall
- keep custom configuration and settings for each package:
for instance the /etc/* and /home/USERNAME/.* files
- do not store any unnecessary files:
for instance contents of /tmp
The question is, which is the best approach to achieve this?
Those I found so far are the following:
- mirror the contents of the system partition with dd command (perhaps excluding the unneeded directories)
disadvantages: uses a lot of space, and maybe I am not able to correctly guess the needed items (there may be unneeded items other than /tmp)
- get the list of currently insatalled packages (sudo dpkg -get-selections > packages.txt) and invoke dpkg with those packages (sudo dpkg -set-selections)
disadvantages: it does not save the packages themselves, only a list of them, so that I would actually need to redownload them which may take a lot of time; it does not save custom settings and this solution does not deal with packages added "manually" (through dpkg -i <packagename.deb>) -- of course these packages would appear in the list, but they would not be available for install as they are stored locally
- use a special utility (called remastersys) to clone an existing installation
this seems the best solution so far, however:
it has been reported not to work correctly in some cases (see: http://www.ubuntu-unleashed.com/2007/09/remaster-and-clone-your-ubuntu-install.html) -- it does not save the restricted drivers of nvidia, and it does not cope with Hardy.
To summarize, my question is the following:
Is there a tool like "remastersys" but working absolulte correctly with Intrepid Ibex (or Hardy)?
Or is there a better way to make working environment backup than those I have found so far?
------------------------------------------------------------------------
Other question:
The system is set up on an encrypted partition. I do not think there is a way to automatically restore the system within the encrypted partition other than copying the whole partition with dd.
So the reinstall process would look something like this:
- recreate the encrypted partition and encrypted swap manually
- install all the packages from the custom install CD
For this purpose I would need to create a custom install CD like the "Alternate Installation CD"
However if this is not possible, I am ready to do without encryption and just create an install CD like the "Normal" one.
Thanks for any help