Subject: backup: dump | gzip | cdrecord ?
To: None <netbsd-users@netbsd.org>
From: Geert Hendrickx <geert.hendrickx@ua.ac.be>
List: netbsd-users
Date: 08/06/2005 15:23:37
Hello guys, 

I'm looking for a way to backup to cd's/dvd's using dump(8).  Searching
through the archives, I found this post: 

http://mail-index.netbsd.org/netbsd-users/2002/01/02/0023.html

This method looks very convenient (almost like dumping to tapes), but I
would like to throw gzip and maybe gnupg into the mix.  Someone posted a
script to compress the dumpfile, split(1) it and write those chunks to a
cd: 

http://mail-index.netbsd.org/netbsd-users/2002/01/04/0001.html

but then you lose dump/restore's very convenient volume handling.  This is
not really a problem for a system-level restore (read all the chunks from
the cd's, cat them together, gunzip, and restore), but not very convenient
if you want to restore just a few files.  

One solution would be to embed gzip into dump(8) (and gunzip into
restore(8)), so dump can start a new volume when the *compressed* data has
reached a predefined size.  Or, more generally, we could define an extra
command line option for dump so that it accepts a command (sequence)
through which it pipes all the data before writing it to tape/file.  Then
the user can pipe it through anything he wants, be it gzip, gnupg, ...
Same for restore, of course.  

Another (similar) solution would be to create some kind of fifo-like
pseudo-device which pumps the data through gzip, and returns an end-of-
media signal to attain the same effect as a tape with hardware compression.  

What do you guys think?  

GH