Subject: Re: backup: dump | gzip | cdrecord ?
To: None <ghen@telenet.be>
From: Wojciech Puchar <wojtek@tensor.3miasto.net>
List: netbsd-users
Date: 08/26/2005 14:01:50
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--0-768193294-1125057710=:7347
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

> 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
>
a bit upgrade what i wrote here with DVD's.


buy DVD+-RW recorder it makes 7x more space on really cheap media and..
it CAN be directly writable!!!


of course - it would be nice for dump to have and option of compression 
and gzip, or at least pipethrough.

follow the instruction


1) unpack the attached file somewhere. should be exactly 32kB

2) buy DVD+RW media. DVD-RW may be used too, but i do prefer +RW. -RW 
often makes errors at least in my case, while i have never problems with 
+RW. price is near the same.

3) install dvd+rw-tools from pkgsrc

4) on fresh DVD+RW media do

dvd+rw-format /dev/rcd0d

on DVD-RW do

dvd+rw-format -force=full /dev/rcd0d

second will go through all disc but anyway it's OK

then do

dd if=/path/to/DVDLABEL-RW of=/dev/rcd0d bs=32k
scsictl /dev/rcd0d flushcache
eject /dev/rcd0d
eject -l /dev/rcd0d


5) do dump with -a -b 64 and give /dev/rcd0a (not d!!) as tapefile.


when disc ends, do scsictl /dev/rcd0d flushcache


notes:

a) writing label and using a partition to DVD+-RW is mandatory. NetBSD 
does not detect size of DVD+-RW media. this label looks like that

4 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
  a:   9180352        64     4.2BSD      0     0     0  # (Cyl.      0*- 
91804*)
  d:   9180416         0    ISO9660       0             # (Cyl.      0 - 
91804*)
disklabel: partitions a and d overlap

b) scsictl /dev/rcd0d flushcache is mandatory, drive will refuse to eject 
DVD or even may lock up without it. reading anything from drive makes the 
same effect. anyway NetBSD kernel should do it on device close if at least 
one write done.

c) at least at first usage verify should be done after backup

dd if=/dev/rcd0a bs=1m of=/dev/null progress=1

to make sure media isn't broken.

d) -b 64 is mandatory for DVD-RW media (can write in 32kB blocks), not 
mandatory for DVD+RW media but anyway use it for better performance.

e) when using fresh DVD+RW media after flushcache you may not be able to 
eject the disc. it's because DVD+RW in-drive background formatter works.
check the state with dvd+rw-mediainfo

f) no work with double layer DVD's if double later -+RW exist at all - 
but should be OK after modifying the label file for right sizes.

--0-768193294-1125057710=:7347
Content-Type: APPLICATION/octet-stream; name=DVDLABEL-RW.gz
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.NEB.4.62.0508261401500.7347@chylonia.3miasto.net>
Content-Description: 
Content-Disposition: attachment; filename=DVDLABEL-RW.gz

H4sICAAAAAACA0RWRExBQkVMLVJXAO3RPQ5BQRAA4FmRiISOXs8hFN4FFF4t
fkNBhOjVruAujublRcjT0fq+ZDI7s5PdTTaCf5Znk0u7yKPJqD/O3/3zbnNc
bPen2Xp6KBu1iHmRUhG3ZSrX0b2+5gcpVc5NX75hldUjelHGvXON4XOvEdW6
+XHvZ93ypQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMCPHprMthcA
gAAA

--0-768193294-1125057710=:7347--