Backup to CD-Rs and DVDs.
Julien Gabel
jpeg at thilelli.net
Sat Jan 29 06:32:15 PST 2005
>>> 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bckp2dvd.sh
Type: application/octet-stream
Size: 1255 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20050129/d7e6ebfe/bckp2dvd.obj
More information about the freebsd-questions
mailing list