Date: Sat, 29 Jan 2005 15:32:03 +0100 (CET) From: "Julien Gabel" <jpeg@thilelli.net> To: freebsd-questions@freebsd.org Cc: Xian <ian@codepad.net> Subject: Re: Backup to CD-Rs and DVDs. Message-ID: <64701.192.168.1.18.1107009123.squirrel@192.168.1.18> In-Reply-To: <200501300002.12217.imoore@picknowl.com.au> References: <200501270100.56303.ml-freebsd-newbies@codepad.net> <41FAEC16.9000708@mindspring.com> <200501291200.04666.ian@codepad.net> <200501300002.12217.imoore@picknowl.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
------=_20050129153203_67495 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit >>> 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. ------=_20050129153203_67495 Content-Type: application/octet-stream; name="bckp2dvd.sh" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="bckp2dvd.sh" IyEvYmluL3NoCgpQQVRIPS9iaW46L3NiaW46L3Vzci9iaW46L3Vzci9zYmluOi91c3IvbG9jYWwv YmluOi91c3IvbG9jYWwvc2JpbjsgZXhwb3J0IFBBVEgKcmhvc3Q9IiQxIgpydXNlcj0icmVtb3Rl dXNyIgpkZXZpY2U9Ii9kZXYvY2QwIgpkdW1wZGlyPSIvdG1wL2R1bXAiCm5icGFzcz0wCgoKb25l eGl0KCkgewogIGNsZWFudXBhbGwgMT4mMgogIHRyYXAgLSBIVVAgSU5UIFFVSVQgVEVSTQogIGV4 aXQgMjU0Cn0KY2xlYW51cCgpIHsgXHJtIC1yICR7ZHVtcGRpcn0vKi5kdW1wLmd6OyB9CmNsZWFu dXBhbGwoKSB7IFxybSAtciAke2R1bXBkaXJ9OyBzc2gtYWdlbnQgLXNrOyB9Cgp0cmFwIG9uZXhp dCBIVVAgSU5UIFFVSVQgVEVSTSAgICMgT3Igc2lnbmFsKHMpIG51bWJlcjogMSAyIDMgMTUKCgpl dmFsIGBzc2gtYWdlbnQgLXNgCnNzaC1hZGQgfi8uc3NoL2lkX2RzYQoKWyAhIC1kICR7ZHVtcGRp cn0gXSAmJiBcCiBta2RpciAke2R1bXBkaXJ9ICYmIFwKIGNob3duIHJvb3Q6b3BlcmF0b3IgJHtk dW1wZGlyfSAmJiBcCiBjaG1vZCAwNzUwICR7ZHVtcGRpcn0KCmR2ZCtydy1mb3JtYXQgLWZvcmNl ICR7ZGV2aWNlfQptb3VudHBvaW50cz0kKHNzaCAke3J1c2VyfUAke3Job3N0fSAibmF3ayAnXCQz ID0gL3Vmcy8gJiYgXCQyICF+IC9cL3RtcC8ge3ByaW50IFwkMn0nIC9ldGMvZnN0YWIiKQoKZm9y IG1vdW50cG9pbnQgaW4gJHttb3VudHBvaW50c30KZG8KICBjYXNlICR7bW91bnRwb2ludH0gaW4K ICAvKQogICAgc3NoIC1DICR7cnVzZXJ9QCR7cmhvc3R9ICJkdW1wIC0wdWFMZiAtICR7bW91bnRw b2ludH0iIHwgZ3ppcCAtYzkgPiAke2R1bXBkaXJ9L3Jvb3QuZHVtcC5negogICAgWyAke25icGFz c30gLWVxIDAgXSAmJiBvcHQ9IloiIHx8IG9wdD0iTSIKICAgIGdyb3dpc29mcyAtJHtvcHR9ICR7 ZGV2aWNlfSAtUiAtSiAke2R1bXBkaXJ9L3Jvb3QuZHVtcC5negogIDs7CiAgKikKICAgIHNzaCAt QyAke3J1c2VyfUAke3Job3N0fSAiZHVtcCAtMHVhTGYgLSAke21vdW50cG9pbnR9IiB8IGd6aXAg LWM5ID4gJHtkdW1wZGlyfSR7bW91bnRwb2ludH0uZHVtcC5negogICAgWyAke25icGFzc30gLWVx IDAgXSAmJiBvcHQ9IloiIHx8IG9wdD0iTSIKICAgIGdyb3dpc29mcyAtJHtvcHR9ICR7ZGV2aWNl fSAtUiAtSiAke2R1bXBkaXJ9JHttb3VudHBvaW50fS5kdW1wLmd6CiAgOzsKICBlc2FjCiAgY2xl YW51cAogIG5icGFzcz1gZXhwciAke25icGFzc30gKyAxYApkb25lCmNsZWFudXBhbGwKCmV4aXQg MAo= ------=_20050129153203_67495--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?64701.192.168.1.18.1107009123.squirrel>