[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: etc partially deleted

On Tue, Nov 07, 2006 at 03:53:56PM +0100, Carlos Ojea wrote:
> >What about your /etc/ backup from _this_ computer?  Use mc, enter the
> >tar file you made before this happened, and copy necessary stuff back.
> My /etc/ backup? That is not made by the system and I should had done
> that ... right? I am afraid I don't have that backup...

Since we're still talking about this, I'm assuming that this box isn't
mission-critical or you would have just reinstalled.

However, since so many packages likely do need to be reinstalled and
since you don't have an /etc backup, it will probably be less work
overall to just reinstall.

While you wait for stuff to download during or after the inital install,
you should probably read debian-reference (and the installation manual)
both available as packages.

You will also want to save a list of all the packages that your system
thinks are installed so you can get them all back.  This list can be
generated with:

	dpkg --get-selections > debsel.txt

Note, however, that this will not include why a particular package was
installed.  For example, nobody goes and manually installs most of the
lib* packages, they get installed automatically when you choose the
package that depends on them.  

Does anyone know the equivalent command for aptitude?

I do not suggest using dpkg --set-selections.  Rather, once the base
system is installed, go down your debsel.txt and install descrete
packages one or two at a time using aptitude set to automatically
install deps but not recommends.  For example, you know you need an
editor, so install your favorite editor (or the editors listed in
debsel.txt).  This avoids having thousands of packages trying to
install and finding some obscure interaction that nobody's found before.
If your favorite editor needs X, have a favorite console
editor.  For out and out utility in one package, its hard to beat mc
(midnight commander) which includes an editor and can delve into tar and
deb archives.  

There's lots of HOWTOs on backup and recovery and the debian-reference
is usefull too.  I've appended my backup strategy.  

Good luck.



My backup strategy is layered.  There are files in /etc/ that I need
inorder to get anything booting and accessed:


I have a cron job copy these from /etc to

The [hostname] for me is important because I use scp to copy the backup
sets around to all my computers so any computer has all data needed to
restore the whole system.  Cron takes care of this too.

I also copy /boot/grub.

note that /var is a separate partition from /,
	my next computer (the one I'm working on now) will have
	/var/local a separate volume group.

These I store in plain-text (not in a tar archive) on media which can be
read by other computers, in msdos format (floppy, or now USB stick).  I
keep the module stuff and fstab on paper as well.

Absolutly essential personal files from /home also go on media in msdos
format plain text (or html or pdf).  A copy of this, with install media
that works on the computer goes into the bank's safety deposit box.  A
copy is mailed to family out of town.

Note that I got burned on this.  My P-II died and I had to build a new
computer.  My Woody install media wouldn't work with SATA drives.  I had
neglected to keep a copy of installation media that will work on __new__

Then, complete backup of everything that apt/dpkg doesn't control
(/boot/grub, /etc, /home, /root, /var/local (except /var/local/backup),
/usr/local) is archived to /var/local/backup.  I then copy this to
whatever media.  One set goes to the bank.  Occasionally, another set
goes to family out of town.

Reply to: