-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I use dirvish at work for our backups. If you don't want to use some of
the standard backup Debian/Ubuntu packages like dirvish or amanda then
you may like this little roll-your-own.
My home "backup program" run from a cron once a week. I have a cron that
emails me once a month to throw in a blank dvd and so I get a dvd burn
of the tar once a week. It backs up everything in /etc, /root, /boot,
various dirs in /var and where files or directories _do not_ match what
is in a 'backup-exclude' text file. I don't bother with the */usr or
*/bin dirs as I don't really compile a lot of packages and I do a dpkg
- --get-selection into a file in root if I lose the system. The beauty of
this is that instead of being an 'opt-in' program, it's an 'opt-out'. So
chances are you'll have too much in there . . . always better than too
little. :)
Note: the TAR line is all one line. Once it's running you could get rid
of the -v in the tar command as it's very verbose. Also, I think the -p
is redundant with the --preserve-permissions.
If you use something like this, it's best to run it a few times to build
your backup-exclude file and to get an idea of how big a tar you're
talking, i.e. will it fit on a dvd, should it be gziped/bzip2'd.
I copy the tar to a separate HD in the machine, but if you don't have a
separate HD then this may not be to your liking.
####################
#!/bin/sh
# Backup program.
# Set vars.
DAY=`date +%A`
LABEL=`date`
OUT=/archive/backup.tar
TAR='tar -c --atime-preserve --one-file-system --preserve-permissions -X
/home/lance/backup/backup-exclude'
cd /
echo "Backup Started."
date
# Burn to tar
$TAR -vjpf $OUT etc home root boot var/www var/spool var/log var/mail
# Burn to dvd
growisofs -speed=1 -Z /dev/dvd -R -J ${OUT}
eject /dev/dvd
##########
The backup-exclude file, throw regular expressions in here if you don't
want them backed up. ignore the ellipse as they're there only to
separate the file into examples.
#######
etc/terminfo
etc/gtk
etc/modutils
etc/logcheck
etc/defoma
etc/texmf
(...)
home/lance/.thumbnails/*
home/.Trash-root/*
home/lance/Desktop/RealBasic
home/lance/News/*
*~
*.iso
home/lance/archives
home/lance/Music_Styles
(...)
*.tar
*.gz
*.tgz
######
Les Klassen Hamm wrote:
> I keep reading this "backup /home, reinstall, and away you go" thing,
> and I think I must be doing things wrong. First, /home should always be
> backed up, but that's another matter. The painful part of a fresh
> install is making sure I had those mysql db's backed up recently too,
> and the apache configs, and that php.ini and the system-wide settings
> for vim, and the postfix configs, and the cron jobs, and the ... on and on.
>
> Am I missing some basic admin practices that make this more smooth? I've
> played with making a ./configed folder and filling it with symlinks for
> every file that I manually edit or adjust, but that becomes cumbersome
> and usually abandoned after a while. It's a week of evenings before I'm
> back to becoming functional after an install, at best. That's a major
> reason I tend to stick with LTS versions of ubuntu - though you'll
> definitely feel behind then, unless you manually adjust - the default
> firefox for the current LTS version (606) is, I think, 1.5.xx.
>
> Anyone got some great tricks to deal with this? I've actually found
> dist-upgrades to be the best upgrade... sometimes. Most often, I just
> wait to upgrade when I move to a new box. Start fresh, migrate via the
> network, gradually switch to the new machine.
> Les...
>
> --
> I'm interested in upgrading my 28.8 kilobaud internet connection to a
> 1.5 megabit fiberoptic T1 line. Will you be able to provide an IP
> router that's compatible with my token ring ethernet LAN configuration?
>
> To unsubscribe, send a message with the word "unsubscribe" (without the
> quotes) in the body to linux-request@slg.org
> Archives are at http://list.slg.org/
Cheers,
lance
- --
Lance Levsen,
Catprint Computing
Tel: (306) 493-2249
Cell: (306) 230-8783
Blog: http://www.catprint.ca/blog/
SaskBlogs: http://saskblogs.catprint.ca/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFH4LJeWSOc2vLaecgRAvDgAKCvB2EQlCJ1GvrwGgqb1ZHlLQjkGACgi7D+
+OtP8MS+MSlG5hGz6SjUINo=
=lFRN
-----END PGP SIGNATURE-----
Received on Wed Mar 19 00:27:47 2008
This archive was generated by hypermail 2.1.8 : Wed Mar 19 2008 - 00:27:52 CST