Re: dump/restore over ssh question
From: Andy Firman [EMAIL PROTECTED] On Fri, May 06, 2005 at 04:28:40PM +0100, Xian wrote: To restore the filesystems: Boot from a rescue disk and create the partitions of on the disk. I've never smashed anything badly enough to need to work out how to do this. At least the partitions were still there. Well this is more complicated than it seems. First of all, using the fixit mode from 4.11-RELEASE-i386-disc2.iso and trying to use disklabel -e does not work. It gives this error: disklabel: /mnt2/stand/vi: No such file or directory It turns out vi is located at /mnt2/usr/bin/vi and one has to set EDITOR=/mnt2/usr/bin/vi for disklabel to work. Is that a bug? This also happens when I boot off disk1, enter fixit mode, and use the live filesystem with disk2. It is very easy to dump filesystems for backup, but it is not easy to restore filesystems. (I am trying to do this all over ssh...not tape) It is probably just better, easier, faster, to backup all your data and config files (rsync -e ssh -avp ...) and in case of disk failure, replace the disk, install fresh OS, then restore data and config files. What do you think? Why not just create a bootable disk *as* your backup. That's what I do. I run it once a week and then also backup every night to a disk based backup server. If my system disk fails, I just need to but off of my backup disk and then restore my nightly backups. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: dump/restore over ssh question
On Fri, May 06, 2005 at 04:28:40PM +0100, Xian wrote: To restore the filesystems: Boot from a rescue disk and create the partitions of on the disk. I've never smashed anything badly enough to need to work out how to do this. At least the partitions were still there. Well this is more complicated than it seems. First of all, using the fixit mode from 4.11-RELEASE-i386-disc2.iso and trying to use disklabel -e does not work. It gives this error: disklabel: /mnt2/stand/vi: No such file or directory It turns out vi is located at /mnt2/usr/bin/vi and one has to set EDITOR=/mnt2/usr/bin/vi for disklabel to work. Is that a bug? This also happens when I boot off disk1, enter fixit mode, and use the live filesystem with disk2. It is very easy to dump filesystems for backup, but it is not easy to restore filesystems. (I am trying to do this all over ssh...not tape) It is probably just better, easier, faster, to backup all your data and config files (rsync -e ssh -avp ...) and in case of disk failure, replace the disk, install fresh OS, then restore data and config files. What do you think? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
dump/restore over ssh question
I am following this guide: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/backup-basics.html and successfully dumped /, /usr, and /var over ssh to another box and called them root-back.gz, usr-back.gz, and var-back.gz. But I can't figure out the restore part. Let's say I replace the harddrive and need to restore the 3 dumped filesystems. How do I go about this for my 4.11 box? What I have done so far is: 1. Replace the hard drive 2. Minimal install of 4.11 so the drive is partitioned the same as before 3. Copied the 3 dumped/gzipped files over ssh to the system w/new drive 4. Then I booted into fixit mode, and am stuck here... How do I restore the 3 filesystems? Thanks, Andy ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: dump/restore over ssh question
On Friday 06 May 2005 15:34, Andy Firman wrote: I am following this guide: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/backup-basics.htm l and successfully dumped /, /usr, and /var over ssh to another box and called them root-back.gz, usr-back.gz, and var-back.gz. But I can't figure out the restore part. Let's say I replace the harddrive and need to restore the 3 dumped filesystems. How do I go about this for my 4.11 box? What I have done so far is: 1. Replace the hard drive 2. Minimal install of 4.11 so the drive is partitioned the same as before 3. Copied the 3 dumped/gzipped files over ssh to the system w/new drive 4. Then I booted into fixit mode, and am stuck here... How do I restore the 3 filesystems? Thanks, Andy ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] To restore the filesystems: Boot from a rescue disk and create the partitions of on the disk. I've never smashed anything badly enough to need to work out how to do this. At least the partitions were still there. Then newfs the partitions. Assuming you are putting back /tmp as well. You will need some temp space for restore to work. newfs -O2 -U /dev/ad0s1a newfs -O2 -U /dev/ad0s1d newfs -O2 -U /dev/ad0s1e newfs -O2 -U /dev/ad0s1f Then mount the filesystems. cd /mnt mkdir root var usr tmp mount /dev/ad0s1a root . . . mount /dev/ad0s1f usr Set the temp dir so restore can use all the temp space it wants setenv TMPDIR /mnt/tmp Then for each file system to be restored, cd into the right place, fetch the backup and restore it. cd /mnt/usr ssh BoxWithBackupsOn cat /path/to/backup | zcat | restore -rf - It would be a wise idea to test this on another box if you can because it is much nicer to attempt a restore knowing it has been done before. -- /Xian When the going gets tough, the tough take a coffee break unknown author ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]