Re: Backing up a Debian system
On Wed, Jul 31, 2002 at 11:40:55AM -0500, Drew Scott Daniels wrote:
> Matt Zimmerman <email@example.com> said in regards to "Debian (would like) to
> do list" on debian-user:
> > I've been doing these kinds of backups in various custom ways for a
> > while now, and would very much like to see a tool which understands FHS
> > and a little bit of Debian which could be used by an average user.
> > I have in mind something like the Backup/Restore applet on the Zaurus.
> > With a few taps of the stylus, the user can back up all of their data
> > that is not part of the stock system, wipe it, install a new one, and
> > restore their data. I think that this is achievable for Debian.
> My Debian backup steps:
> 1. I remove files and packages that I'm sure I don't want or need
> (deborphan can help me figure this out. So could a nice tree of
> dependencies, but I can't remember what program shows this nicely. Anyone
> know of such a program?)
apt-cache + graphviz. But be warned, the output will be larger, more
complex and less useful than you expect.
> The rest of the steps do not allow for incremental backups, and may be
> modified to allow incremental backups.
> 10. Append "tar -af backupfile.tar " in a text file, at the beginning of
> every line that lists a file to backup except the first one which I do
> "tar -cf backupfile.tar" (tr may be helpful, but what's the proper
> command? I'd prefer to avoid perl, but is it more common than tr? If so
> what's the proper perl -e line?). I then make the text file executable and
> execute it.
Sounds like you want cpio, or tar --files-from.
> 11. I run "bzip2 -9 backupfile.tar".
You really want to do this in a pipeline to avoid wasting a lot of disk
> I would appreciate help in generating a program/script to automate these
> steps (and getting it made into an uploaded package). Also help in
> figuring out a good way to make an incremental backup would be very
My backups are aimed toward reconstructing the system from a Debian archive
+ the backup. This means saving selections and package versions,
/usr/local, /etc, /home, /var and any local directory hierarchies. I also
back up my partition table and the like.
This could definitely be trimmed down, for example to exclude /var/cache,
/var/spool, etc. It could also be enhanced, to give warnings or such if
installed packages are not present in Debian or the local package repository.
Any locally installed packages which did not come from Debian are kept in a
directory which is backed up, so theoretically, I should be able to restore
the system based on this data. Of course, this is all theory since I have
never attempted it, and I am only using this approach on systems where
recovery time is not critical (a full backup is still the way to go for