[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What kind of tape backup device should I get?
- To: misc_(_at_)_openbsd_(_dot_)_org
- Subject: Re: What kind of tape backup device should I get?
- From: "Morten Liebach" <m_(_at_)_mongers_(_dot_)_org>
- Date: Sat, 24 Aug 2002 12:39:25 +0200
- Mail-followup-to: Morten Liebach <m_(_at_)_mongers_(_dot_)_org>, misc_(_at_)_openbsd_(_dot_)_org
On 2002-08-23 12:55:45 -0700, Ben Goren wrote:
> On Fri, Aug 23, 2002 at 02:02:17PM -0400, Chris W. Rea wrote:
>
> > Now that my system is configured to my liking, I'd like to be
> > ready for disaster by performing regular backups.
>
> First, it's wonderful that you're doing this. Far too many people
> just ignore the whole issue....
Me too, mostly ... :)
[snip]
> There are lots of other factors to consider, too. if you've got a
> LOT of data, you're pretty much stuck with a tape jukebox...not
> cheap--but the data probably isn't cheap, either. You may want an
> archive as well as a backup, in which case you need a system for
> keeping separate backups for each day, week, etc., for however
> long; this is where an incremental backup, such as what dump does,
> is a big help. You may want to step through changes made to your
> files, in which case you're really looking for rcs (1) or
> something similar.
Or cvs(1), it's harder to learn, but it's really worth it.
[snip]
> Me? I can take the time to rebuild my own machines and I can't
> afford a tape drive, so I've mostly abandoned my efforts to get
> dump working.
[snip]
I don't understand what's so hard about making dump work.
I have my stuff on my laptop, and a CD-burner in my old crappy 'server'.
I wrote a very short little script to backup a partition to the other
machine via dump(8), gzip(1) and md5(1).
=== begin ===
#!/bin/sh
LEVEL="$1" # first arg is the dump level
DEVICE="$2" # second arg is which device/filesystem to backup
FILE="$3" # third arg is the filename to write to
# edit these to suit your site.
HOST='oenone' # host to backup to
BACKUPDIR='/home/m' # dir on remote to save stuff to
GZIP='-3' # gzip(1) compression level, default is -6
# dump filesystem and gzip it, make an MD5 sum on it and write all to a
# file.
((dump -${LEVEL} -auf - ${DEVICE} | gzip -c | tee /dev/fd/3 | \
ssh ${HOST} "cat - > ${BACKUPDIR}/${FILE}.gz" >&4) 3>&1 | \
md5 | sed "s/^/MD5 (${FILE}.gz) = /" > ${BACKUPDIR}/${FILE}.gz.MD5) \
4>/dev/stdout
=== end ===
Remember you can do a dump as a normal user, as long as that user is a
member of the operator group.
To restore it's just to pipe the gzipped dump file through gzip to
restore. ftp(1) can be used to fetch the dump from the remote host, and
ftp(1) is on the bsd.rd image.
Hope this helps
Morten
--
"Morten Liebach" <m_(_at_)_mongers_(_dot_)_org> :: http://m.mongers.org/
PGP: http://m.mongers.org/m.asc :: PGP Key-ID: F1360CA9
+++ Please don't Cc: me, I read this list +++
Visit your host, monkey.org