Re: Backup to CD-Rs and DVDs

2005-01-29 Thread Xian
On Saturday 29 January 2005 01:51, Carleton Vaughn wrote:
 Ian Moore wrote:
  Anyway, to backup /usr directly to a dvd(+rw), I use the this command:
  dump -0 -uL -C16 -B4589840 -P 'growisofs -speed=4 -Z /dev/dvd=/dev/fd/0 '
  /usr This gives you a dvd or series of dvds with the dump file on them.
  You can then boot from CD2 (live system) and use restore to restore the
  data. If the link above is the one I think it is, it gives you an example
  restore command.

 I'm in the same boat as Xian.  I want to backup to DVD so I can upgrade to
 5.3.  dump in 4.10 does not have a -P option, and growisofs says nothing
 about handling spanning, so how do I span my dump over multiple DVDs?

 dump -h0 -B 4589840 -S /usr says I'm going to need 6.18 tapes.  I'm going
 to crack open a beer and just pipe it, to see what happens.

 Then some day if all goes well I will split /usr into /usr and /usr/home,
 'cause this is ridiculous.

 Thanks.

I have another machine running 4.9 (also without the -P option for dump) and 
the way I get round it is to create the dump on another disk in pieces then 
transfer them to another machine for burning.

 dump usual args -Bsize of dvd -f /home/usr.dump /usr

/usr and /home are on different disks. Then when dump asks me if the next 
volume is ready I move /home/usr.dump to /home/usr/dump.1, then tell dump 
yes. And so on until dump has finished

However I am having some issues with this. I transfer them to another machine, 
(checking the md5 of them is the same before and after transfer them), and 
test it with restore

 restore -Nxvb 2 -f usr.dump.1

and the first volume works fine, it says 'End-of-tape encountered'. I start 
the next volume and it tells me 

 unexpected tape header
 abort? [yn]

What could be doing this and how do I fix it?
-- 
/Xian

Never put off until tomorrow what you can avoid altogether
unknown author
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Backup to CD-Rs and DVDs

2005-01-29 Thread Ian Moore
On Sat, 29 Jan 2005 22:30, Xian wrote:
 On Saturday 29 January 2005 01:51, Carleton Vaughn wrote:
  Ian Moore wrote:
   Anyway, to backup /usr directly to a dvd(+rw), I use the this command:
   dump -0 -uL -C16 -B4589840 -P 'growisofs -speed=4 -Z /dev/dvd=/dev/fd/0
   ' /usr This gives you a dvd or series of dvds with the dump file on
   them. You can then boot from CD2 (live system) and use restore to
   restore the data. If the link above is the one I think it is, it gives
   you an example restore command.
 
  I'm in the same boat as Xian.  I want to backup to DVD so I can upgrade
  to 5.3.  dump in 4.10 does not have a -P option, and growisofs says
  nothing about handling spanning, so how do I span my dump over multiple
  DVDs?
 
  dump -h0 -B 4589840 -S /usr says I'm going to need 6.18 tapes.  I'm
  going to crack open a beer and just pipe it, to see what happens.
 
  Then some day if all goes well I will split /usr into /usr and /usr/home,
  'cause this is ridiculous.
 
  Thanks.

 I have another machine running 4.9 (also without the -P option for dump)
 and the way I get round it is to create the dump on another disk in pieces
 then transfer them to another machine for burning.

  dump usual args -Bsize of dvd -f /home/usr.dump /usr

 /usr and /home are on different disks. Then when dump asks me if the next
 volume is ready I move /home/usr.dump to /home/usr/dump.1, then tell dump
 yes. And so on until dump has finished

 However I am having some issues with this. I transfer them to another
 machine, (checking the md5 of them is the same before and after transfer
 them), and test it with restore

  restore -Nxvb 2 -f usr.dump.1

 and the first volume works fine, it says 'End-of-tape encountered'. I start
 the next volume and it tells me

  unexpected tape header
  abort? [yn]

 What could be doing this and how do I fix it?

That was how I was considering doing backups in DVD sized chunks until I found 
out the -P option in 5.3.
I've just tried doing it in 5.3  works. Here's what I actually did:

%sudo dump -1 -B 5 -f /mnt/backups/var.dump /var
When prompted for tape 2, in a second xterm I did:
%sudo mv var.dump var.dump.1
Then back in xterm1, I said yes to the continue prompt. The dump completed.

To restore I did:
%restore -Nxvf /mnt/backups/var.dump.1
When asked which tape to use, I said 1
When prompted for tape 2, in xterm2 I did:
%sudo mv var.dump.1 var.dump.a
%sudo mv var.dump var.dump.1
Then back in xterm1:
End-of-tape encountered
You have read volumes: 1
Specify next volume #: 2
Mount tape volume 2
Enter ``none'' if there are no more tapes
otherwise enter tape name (default: /mnt/backups/var.dump.1) none
extract file ./db/entropy/saved-entropy.6
snip
extract file ./tmp/kdecache-root/ksycoca
Add links
Set directory mode, owner, and times.
set owner/mode for '.'? [yn] n

So it works in 5.3, maybe there is a bug in the old dump or restore program?
NB, I didn't need to use -b 2 in the restore command. Perhaps you should try 
it without that switch.

Cheers,
-- 
Ian

GPG Key: http://homepages.picknowl.com.au/imoore/imoore.asc


pgpTsHuZPUT7d.pgp
Description: PGP signature


Re: Backup to CD-Rs and DVDs.

2005-01-29 Thread Julien Gabel
 I'm in the same boat as Xian.  I want to backup to DVD so I can
 upgrade to 5.3.  dump in 4.10 does not have a -P option, and growisofs
 says nothing about handling spanning, so how do I span my dump over
 multiple DVDs?

 Then some day if all goes well I will split /usr into /usr and
 /usr/home, 'cause this is ridiculous.


There is 2 limitations here:
  - The dump's option '-P' is relatively new, and not supported on old
releases;
  - A file can't be larger than 2Gb using an ISO 9660 file system.

Knowing these 2 points here, here is a sh(1) shell script than i use
and which do the following:
  1/ Backup a remote FreeBSD system on a local DVD writer;
  2/ Currently 5.X since i hardcoded the dump's option '-L') but that
 is easily bypassed;
  3/ Over ssh;
  4/ Using a remote user which must be in the group 'operator';
  5/ Because i use the same grown iso fs to hold all the backuped fs,
 this script need a local temporary space which size just need to
 be the size of the larger compressed remote fs (generally /usr
 or /home) not a sum of all of these;
  6/ Automatically get the fs to backup from the remote fstab (begining
 with the root fs).

As it is a little _home_script_, there is some caveats to know:
  - It must launch as root from the local system in order to be able
to write to the local DVD burner;
  - It assume that that the larger compressed remote fs is lesser than
the 2Gb limitation (you can for example set the nodump flag on
/usr/ports/distfiles/*, if this is not an issue for you, to decrease
the size of the /usr dump);
  - Some commands/options are hardcoded;
  - May be extended to managed more than one copy of each backuped fs
if there is sufficiently space left on the DVD...

Oh, yes... to restore just do the following (/home for example):
  # mount -t cd9660 /dev/cd0 /cdrom
  # cd /home; gzip -dc /cdrom/home/dump.gz | restore -ivf -

-- 
-jpeg.

bckp2dvd.sh
Description: Binary data
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Backup to CD-Rs and DVDs

2005-01-28 Thread Ian Moore
On Fri, 28 Jan 2005 05:49, Xian wrote:
 On Thursday 27 January 2005 12:39, Xian wrote:
  On Thursday 27 January 2005 10:37, Ian Moore wrote:
Hope that's the kind of thing you are after.
   http://www.freebsd.org/cgi/cvsweb.cgi/src/sbin/dump/main.c?rev=1.59co
   nt en t-type=text/x-cvsweb-markup Cheers,
 
  That's exactly what I'm looking for thanks.
  I tried it with a CD-RW like this
   dump -0 -L -C16 -B716800 -P 'burncd -e blank data - fixate' /var
  and it works well. I'll try DVDs when I have some.
 
  THANKS :D

Glad I could help :-)

 I just found that I need to use the -b 2 switch with restore, does that
 mean I need to use it with dump as well?

I'm not sure, but if you are able to successfully retore dumps made without -b 
2, then I guess you don't need t!.

Cheers,
-- 
Ian Moore

GPG Key: http://homepages.picknowl.com.au/imoore/imoore.asc


pgp77xufpFUig.pgp
Description: PGP signature


Re: Backup to CD-Rs and DVDs

2005-01-28 Thread Carleton Vaughn
Ian Moore wrote:
Anyway, to backup /usr directly to a dvd(+rw), I use the this command:
dump -0 -uL -C16 -B4589840 -P 'growisofs -speed=4 -Z /dev/dvd=/dev/fd/0 ' /usr
This gives you a dvd or series of dvds with the dump file on them. You can 
then boot from CD2 (live system) and use restore to restore the data. If the 
link above is the one I think it is, it gives you an example restore command.
I'm in the same boat as Xian.  I want to backup to DVD so I can upgrade to 
5.3.  dump in 4.10 does not have a -P option, and growisofs says nothing about 
handling spanning, so how do I span my dump over multiple DVDs?

dump -h0 -B 4589840 -S /usr says I'm going to need 6.18 tapes.  I'm going to 
crack open a beer and just pipe it, to see what happens.

Then some day if all goes well I will split /usr into /usr and /usr/home, 
'cause this is ridiculous.

Thanks.
--
Carleton Vaughn
College Park, Georgia, USA
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Backup to CD-Rs and DVDs

2005-01-27 Thread Ian Moore
On Thu, 27 Jan 2005 11:30, Xian wrote:
 I don't have any DVD-Rs of any format yet so I was messing about with CDs.
 I found I could burn files to the CD in a variety of ways but I can't get
 them back again.
 I've used dd and burncd to put the file onto a CD and dd sometimes gets
 something back too, but never works properly.
 Any ideas how to do this properly?

I think this is what you are looking for (lists.freebsd.org seems to down at 
the moment, so I can't confirm this is the thread I think it is):
http://lists.freebsd.org/pipermail/freebsd-questions/2004-November/064560.html

Anyway, to backup /usr directly to a dvd(+rw), I use the this command:
dump -0 -uL -C16 -B4589840 -P 'growisofs -speed=4 -Z /dev/dvd=/dev/fd/0 ' /usr
This gives you a dvd or series of dvds with the dump file on them. You can 
then boot from CD2 (live system) and use restore to restore the data. If the 
link above is the one I think it is, it gives you an example restore command.

Hope that's the kind of thing you are after.

Cheers,
-- 
Ian

GPG Key: http://homepages.picknowl.com.au/imoore/imoore.asc


pgpyTrJYYrnPe.pgp
Description: PGP signature


Re: Backup to CD-Rs and DVDs

2005-01-27 Thread Ian Moore
On Thu, 27 Jan 2005 20:23, Ian Moore wrote:
 On Thu, 27 Jan 2005 11:30, Xian wrote:
  I don't have any DVD-Rs of any format yet so I was messing about with
  CDs. I found I could burn files to the CD in a variety of ways but I
  can't get them back again.
  I've used dd and burncd to put the file onto a CD and dd sometimes gets
  something back too, but never works properly.
  Any ideas how to do this properly?

 I think this is what you are looking for (lists.freebsd.org seems to down
 at the moment, so I can't confirm this is the thread I think it is):
 http://lists.freebsd.org/pipermail/freebsd-questions/2004-November/064560.h
tml

Sorry, that's not the right link, try this instead:
http://www.freebsd.org/cgi/cvsweb.cgi/src/sbin/dump/main.c?rev=1.59content-type=text/x-cvsweb-markup
It's not the link I had originally, why didn't I bookmark it? :(

Cheers,
Ian

 Anyway, to backup /usr directly to a dvd(+rw), I use the this command:
 dump -0 -uL -C16 -B4589840 -P 'growisofs -speed=4 -Z /dev/dvd=/dev/fd/0 '
 /usr This gives you a dvd or series of dvds with the dump file on them. You
 can then boot from CD2 (live system) and use restore to restore the data.
 If the link above is the one I think it is, it gives you an example restore
 command.

 Hope that's the kind of thing you are after.
http://www.freebsd.org/cgi/cvsweb.cgi/src/sbin/dump/main.c?rev=1.59content-type=text/x-cvsweb-markup
 Cheers,

-- 
Ian

GPG Key: http://homepages.picknowl.com.au/imoore/imoore.asc


pgp0mjNiuv7fy.pgp
Description: PGP signature


Re: Backup to CD-Rs and DVDs

2005-01-27 Thread Xian
On Thursday 27 January 2005 10:37, Ian Moore wrote:
  Hope that's the kind of thing you are after.
 http://www.freebsd.org/cgi/cvsweb.cgi/src/sbin/dump/main.c?rev=1.59conten
 t-type=text/x-cvsweb-markup Cheers,

That's exactly what I'm looking for thanks.
I tried it with a CD-RW like this
 dump -0 -L -C16 -B716800 -P 'burncd -e blank data - fixate' /var
and it works well. I'll try DVDs when I have some.

THANKS :D

-- 
/Xian

One had to cram all this stuff into one's mind for the examinations, whether 
one liked it or not. This coercion had such a deterring effect on me that, 
after I had passed the final examination, I found the consideration of any 
scientific problems distasteful to me for an entire year.
Albert Einstein
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Backup to CD-Rs and DVDs

2005-01-27 Thread Xian
On Thursday 27 January 2005 12:39, Xian wrote:
 On Thursday 27 January 2005 10:37, Ian Moore wrote:
   Hope that's the kind of thing you are after.
  http://www.freebsd.org/cgi/cvsweb.cgi/src/sbin/dump/main.c?rev=1.59cont
  en t-type=text/x-cvsweb-markup Cheers,

 That's exactly what I'm looking for thanks.
 I tried it with a CD-RW like this
  dump -0 -L -C16 -B716800 -P 'burncd -e blank data - fixate' /var
 and it works well. I'll try DVDs when I have some.

 THANKS :D

I just found that I need to use the -b 2 switch with restore, does that mean I 
need to use it with dump as well?

-- 
/Xian

Forbidden fruit creates many jams
Unknown Author
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]