dump/restore don't work, handbook lies
On Tue Sep 2 14:01:06 UTC 2008 Kirk Strauser wrote: On Sunday 31 August 2008 18:03:53 Lloyd M Caldwell wrote: I needed to increase the size of my freebsd root (/). I booted, single user, attached a large usb freebsd formatted file system to receive the backup image. And you're sure that the large usb freebsd formatted file system is intact and that your dump is uncorrupted? I have just been bitten by a very similar problem as Lloyd Caldwell. - restore complains about '/' not being writable (it is but what should happen there??) - restore extracts a few files but leaves most of the dump unrestored with 'expecting YY got ZZ' I have checked the dump several times with restore -rNf /dev/cd0 (yes, it's to a series of DVD-RAMs) plus have extracted a few samples from the first disk apparently from the area which works. Like Lloyd, I am extremely ... delighted ... about the situation but well. Like Lloyd, I have been using FreeBSD for several years with little to complain. Like Lloyd, any help appreciated... Meanwhile I think I will reinstall the box from scratch with 7.0-RELEASE and return to 7-STABLE but I do miss my backup I must say... Oh well. All the best regards, Peter. --- pcc at gmx dot net. ___ 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 don't work, handbook lies
dump -0af /mnt/d201gly-0.dump / [snip] restore -rf /mnt/restore/d201gly-0.dump it complains about '/' issues it complains about 'expecting YY got ZZ' I very rarely use dump/restore, but based on the man page I cannot see what's wrong other than the live fs issue already mentioned. Since no one has suggested the real problem, I would like to suggest that all those 'expecting ...' are also related to whatever errors were printed at the very beginning. So an actual dump of the exact output there would be useful. FWIW, for doing stuff like moving the root fs (which I have done more often than I would like) I recommend using tar -cp or rsync -a. I preserves everything I care about preserving, and it has well-known and well-tested semantics that I feel comfortable with. -- / Peter Schuller PGP userID: 0xE9758B7D or 'Peter Schuller [EMAIL PROTECTED]' Key retrieval: Send an E-Mail to [EMAIL PROTECTED] E-Mail: [EMAIL PROTECTED] Web: http://www.scode.org pgpR9EPx4KtGx.pgp Description: PGP signature
Re: dump/restore don't work, handbook lies
On Sunday 31 August 2008 18:03:53 Lloyd M Caldwell wrote: I needed to increase the size of my freebsd root (/). I booted, single user, attached a large usb freebsd formatted file system to receive the backup image. And you're sure that the large usb freebsd formatted file system is intact and that your dump is uncorrupted? -- Kirk Strauser ___ 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 don't work, handbook lies
On Sun, Aug 31, 2008 at 05:03:53PM -0600, Lloyd M Caldwell wrote: Hello, this all on a 7.0 freebsd system. There are a couple of things missing here. You may have done them and just not mentioned them, but... Dump/Restore do NOT work as indicated in the handbook (or man pages). It would be better to remove information from the handbook rather then have information that doesn't work. I have used dump/restore hundreds or thousands of times, and it works just as described although sometimes the media (tape other disk, whatever) fails. But that is a separate issue. Dump was still working. I needed to increase the size of my freebsd root (/). I booted, single user, attached a large usb freebsd formatted file system to receive the backup image. I ran: dump -0af /mnt/d201gly-0.dump / Did you mount the large USB file system to /mnt? mount /dev/-whatever_the_device_name /mnt Otherwise it wrote the dump to /mnt on the old disk which you wiped. it ran with no complaints and an image was left on the large usb file system (d201gly-0.dump). OK. Probably must have done the mount (maybe) doing a df -k would have told you if /mnt had the USB mounted on it. Did you really look at and verify that image? Before rebooting and starting up the cdrom and fixit, do a mkdir /junk cd /junk restore -ivf /mnt/d201gly-0.dump and use it to look around and maybe even restore a file or two in that scratch directory /junk (or any name you prefer) to make sure it is really there.I always check dumps I must depend on because tape media and occasionally others can be very unreliable - especially DDS (DAT) and I have had to use a lot of that in the past. So, it has become a regular habit. Checking it with one or two files is no absolute guarantee that the whole dump is readable, but it sure reveals the ones where I screwed up while making the dump and if the whole media is bad. I then booted off the livefs cdrom, went to the Fix-it from livefs. I ran fdisk to setup a pc partition for freebsd owning the entire disk. I presume you mean that you created a single FreeBSD slice on the disk. Something like: fdisk -BI da0 I ran disklabel to setup and define the swap and 'a' root partition. I ran disklabel to install boot blocks. That is backwards of what I usually do. I usually do the bsdlabel that writes a new label and put on a boot block first - as in: bsdlabel -w -B da0s1 And then edit the label using bsdlabel to create the 'a' partition. bsdlabel -e da0s1 And edit it (with vi or whatever editor you have specified, I use vi)) so it has everything in an 'a' partition. That usually consists of copying the 'c' line and changing the partition name ('c' to 'a') and making it a '4.2BSD type instead of 'unused' I ran newfs on this new 'a' partition. This should be straightforward. Just: newfs /dev/da0s1a Note, of course, if the disk is SATA or IDE, it is ad0 instead of da0. I ran fsck and mount on the new 'a' partition placing it at /mnt/root. I turned on the large usb drive, fsck'ed it and mounted it on /mnt/restore. I cd into /mnt/root and run: restore -rf /mnt/restore/d201gly-0.dump This looks all right if you got the mounts right. it complains about '/' issues it complains about 'expecting YY got ZZ' This is common and normally inconsequential on a dump of a live file system - and a dump of root from a running system, even in single user is a live filesystem. It just means that something changed from the time the dump directory was created and the actual files were written out. after an hour it completes and NO data file were restored. It did recreate the directory structure but NOT A SINGLE FILE came back. I've studied the man pages and have no clue how to rectify this. after re-reading the handbook on backup basics, I'm sure that anyone using them will loose everything. They are simply useless. take them offline. This is not something a user can practice, as most (I) don't have duplicate hardware of everything to try dump/restore methods and find out they don't work. what went wrong? how do i get my system back? The most likely thing is getting the mounts wrong somewhere along the line. Try looking at that dump file on the USB unit using 'restore -vf' Use the fixit and see what is really on it.Go beyond the directory index and try to restore a file or two. eg, boot the fixit, make some space to write - maybe using /tmp cd in to that space mount that USB device/filesystem do restore -vf USB_FILE_SYSTEM (whatever the dive name is) cd all over and pick a couple of small files to restore. If stuff is there, you should be able to restore -rf if the mounts are right. If not, then you will need to use another backup - you do make regular backups, of course. [EMAIL PROTECTED] I've been running freebsd since 2.1 and am
Re: dump/restore don't work, handbook lies
On Sun, Aug 31, 2008 at 06:53:36PM -0500, J.D. Bronson wrote: At 05:03 PM 8/31/2008 -0600, Lloyd M Caldwell wrote: Hello, this all on a 7.0 freebsd system. Dump/Restore do NOT work as indicated in the handbook (or man pages). It would be better to remove information from the handbook rather then have information that doesn't work. Are you trying to resize the same disc or migrate to a NEW disk? Migrating to a new (larger) disc is trivial, at least in my experience. (I have never tried to resize any partitions though on a same disc, since new hard drives are cheap enough) Here is what I do to migrate to a totally new disc: Shutdown and install 2nd DRIVE boot machine... run sysinstall on the 2nd DRIVE (slice/dice/and setup MBR) then I run a small script like this: (Some presumptions are made ahead of time here) #!/bin/sh newfs /dev/ad2s1a newfs /dev/ad2s1d newfs /dev/ad2s1e newfs /dev/ad2s1f newfs /dev/ad2s1g newfs /dev/ad2s1h sleep 4 tunefs -n enable /dev/ad2s1a tunefs -n enable /dev/ad2s1d tunefs -n enable /dev/ad2s1e tunefs -n enable /dev/ad2s1f tunefs -n enable /dev/ad2s1g tunefs -n enable /dev/ad2s1h sleep 4 mount /dev/ad2s1a /mnta mount /dev/ad2s1d /mntd mount /dev/ad2s1e /mnte mount /dev/ad2s1f /mntf mount /dev/ad2s1g /mntg mount /dev/ad2s1h /mnth dump -C 32 -0Lf - / | ( cd /mnta ; restore xf - ) dump -C 32 -0Lf - /usr | ( cd /mntd ; restore xf - ) dump -C 32 -0Lf - /var | ( cd /mnte ; restore xf - ) dump -C 32 -0Lf - /home | ( cd /mntf ; restore xf - ) dump -C 32 -0Lf - /staff | ( cd /mntg ; restore xf - ) dump -C 32 -0Lf - /users | ( cd /mnth ; restore xf - ) umount /mnt* Then shut down. Place the 2nd drive in the 1st slot and turn it back on. This is the right way, except you left out creating the /mnta.../mnth mount points - which you probably already have created, but are not there on a base system. jerry Maybe there is a better or simpler way, but I have been doing this for years and never had any issues. YMMV -JD ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ 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 don't work, handbook lies
On Mon, Sep 01, 2008 at 02:49:10AM +0100, RW wrote: On Sun, 31 Aug 2008 18:53:36 -0500 J.D. Bronson [EMAIL PROTECTED] wrote: dump -C 32 -0Lf - / | ( cd /mnta ; restore xf - ) One minor caveat: dumping a live filesystem require dump to take a snapshot, which in turn require soft-updates to be turned-on. The default in sysinstall is to enable it for everything but the root partition. It doesn't rewuire the snapshot. That is a feature that is helpful in not missing changes and needs the '-L' flag. But, it will dump just nicely without it and only be momentarily confused on restore if files are missing that show up in the dump directory and will not even know about files that are created after the dump directory was created. If you can tolerate that, then it is not a requirement. jerry ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ 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 don't work, handbook lies
At 02:49 AM 9/1/2008 +0100, RW wrote: dump -C 32 -0Lf - / | ( cd /mnta ; restore xf - ) One minor caveat: dumping a live filesystem require dump to take a snapshot, which in turn require soft-updates to be turned-on. The default in sysinstall is to enable it for everything but the root partition. I always enable soft-updates on all partitions during install or anytime a drive is replaced :-) /dev/ad0s1a on / (ufs, local, soft-updates) devfs on /dev (devfs, local) /dev/ad0s1d on /usr (ufs, local, soft-updates) /dev/ad0s1e on /var (ufs, local, soft-updates) /dev/ad0s1f on /home (ufs, local, soft-updates) /dev/ad0s1g on /staff (ufs, local, soft-updates) /dev/ad0s1h on /users (ufs, local, soft-updates) -JD ___ 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 don't work, handbook lies
On Mon, 1 Sep 2008 02:40:10 +0200 (CEST), Wojciech Puchar [EMAIL PROTECTED] wrote: Did you really run dump on a 'live' filesystem? The filesystem may be changing under the feet of dump, while it copies data. That is bound to cause trouble later on. but shouldn't make NO files restored, maybe few files that was changed while backing up. Yes that's true of course. I was merely replying to the obvious error. Failing to restore *any* files is a different issue. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
dump/restore don't work, handbook lies
Hello, this all on a 7.0 freebsd system. Dump/Restore do NOT work as indicated in the handbook (or man pages). It would be better to remove information from the handbook rather then have information that doesn't work. I needed to increase the size of my freebsd root (/). I booted, single user, attached a large usb freebsd formatted file system to receive the backup image. I ran: dump -0af /mnt/d201gly-0.dump / it ran with no complaints and an image was left on the large usb file system (d201gly-0.dump). I then booted off the livefs cdrom, went to the Fix-it from livefs. I ran fdisk to setup a pc partition for freebsd owning the entire disk. I ran disklabel to setup and define the swap and 'a' root partition. I ran disklabel to install boot blocks. I ran newfs on this new 'a' partition. I ran fsck and mount on the new 'a' partition placing it at /mnt/root. I turned on the large usb drive, fsck'ed it and mounted it on /mnt/restore. I cd into /mnt/root and run: restore -rf /mnt/restore/d201gly-0.dump it complains about '/' issues it complains about 'expecting YY got ZZ' after an hour it completes and NO data file were restored. It did recreate the directory structure but NOT A SINGLE FILE came back. I've studied the man pages and have no clue how to rectify this. after re-reading the handbook on backup basics, I'm sure that anyone using them will loose everything. They are simply useless. take them offline. This is not something a user can practice, as most (I) don't have duplicate hardware of everything to try dump/restore methods and find out they don't work. what went wrong? how do i get my system back? [EMAIL PROTECTED] I've been running freebsd since 2.1 and am beginning to see that unix and freebsd are at the end of their life. they are just tooo arcane for day-to-day use, which was why i used them in the last place. all the gui glue won't fix the broken 'flag' ridden ancient (like me) beast. this is like the 5th thing that I've followed in the handbook that no longer works, takes weeks to figure out why and get done. things that should take minutes take hours, weeks, days, months, years. we have made NO progress in computing environments. it's so discouraging that there is zero innovation in an industry that had such high expectations and potential. [EMAIL PROTECTED] ___ 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 don't work, handbook lies
On Sun, 31 Aug 2008 17:03:53 -0600, Lloyd M Caldwell [EMAIL PROTECTED] wrote: Hello, this all on a 7.0 freebsd system. Dump/Restore do NOT work as indicated in the handbook (or man pages). It would be better to remove information from the handbook rather then have information that doesn't work. I needed to increase the size of my freebsd root (/). I booted, single user, attached a large usb freebsd formatted file system to receive the backup image. I ran: dump -0af /mnt/d201gly-0.dump / it ran with no complaints and an image was left on the large usb file system (d201gly-0.dump). Did you really run dump on a 'live' filesystem? The filesystem may be changing under the feet of dump, while it copies data. That is bound to cause trouble later on. I then booted off the livefs cdrom, went to the Fix-it from livefs. I ran fdisk to setup a pc partition for freebsd owning the entire disk. I ran disklabel to setup and define the swap and 'a' root partition. I ran disklabel to install boot blocks. I ran newfs on this new 'a' partition. I ran fsck and mount on the new 'a' partition placing it at /mnt/root. I turned on the large usb drive, fsck'ed it and mounted it on /mnt/restore. I cd into /mnt/root and run: restore -rf /mnt/restore/d201gly-0.dump it complains about '/' issues it complains about 'expecting YY got ZZ' The manpage of restore says: expected next file inumber, got inumber A file that was not listed in the directory showed up. This can occur when using a dump created on an active file system. If this is the error you are seeing, then this is the explanation of what went wrong too. ___ 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 don't work, handbook lies
At 05:03 PM 8/31/2008 -0600, Lloyd M Caldwell wrote: Hello, this all on a 7.0 freebsd system. Dump/Restore do NOT work as indicated in the handbook (or man pages). It would be better to remove information from the handbook rather then have information that doesn't work. Are you trying to resize the same disc or migrate to a NEW disk? Migrating to a new (larger) disc is trivial, at least in my experience. (I have never tried to resize any partitions though on a same disc, since new hard drives are cheap enough) Here is what I do to migrate to a totally new disc: Shutdown and install 2nd DRIVE boot machine... run sysinstall on the 2nd DRIVE (slice/dice/and setup MBR) then I run a small script like this: (Some presumptions are made ahead of time here) #!/bin/sh newfs /dev/ad2s1a newfs /dev/ad2s1d newfs /dev/ad2s1e newfs /dev/ad2s1f newfs /dev/ad2s1g newfs /dev/ad2s1h sleep 4 tunefs -n enable /dev/ad2s1a tunefs -n enable /dev/ad2s1d tunefs -n enable /dev/ad2s1e tunefs -n enable /dev/ad2s1f tunefs -n enable /dev/ad2s1g tunefs -n enable /dev/ad2s1h sleep 4 mount /dev/ad2s1a /mnta mount /dev/ad2s1d /mntd mount /dev/ad2s1e /mnte mount /dev/ad2s1f /mntf mount /dev/ad2s1g /mntg mount /dev/ad2s1h /mnth dump -C 32 -0Lf - / | ( cd /mnta ; restore xf - ) dump -C 32 -0Lf - /usr | ( cd /mntd ; restore xf - ) dump -C 32 -0Lf - /var | ( cd /mnte ; restore xf - ) dump -C 32 -0Lf - /home | ( cd /mntf ; restore xf - ) dump -C 32 -0Lf - /staff | ( cd /mntg ; restore xf - ) dump -C 32 -0Lf - /users | ( cd /mnth ; restore xf - ) umount /mnt* Then shut down. Place the 2nd drive in the 1st slot and turn it back on. Maybe there is a better or simpler way, but I have been doing this for years and never had any issues. YMMV -JD ___ 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 don't work, handbook lies
man pages and have no clue how to rectify this. after re-reading the handbook on backup basics, I'm sure that anyone using them will loose everything. They are simply useless. take them offline. i use restore regularly and it works. anyway - i do test my backups at least full backups. but never got that. ___ 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 don't work, handbook lies
Did you really run dump on a 'live' filesystem? The filesystem may be changing under the feet of dump, while it copies data. That is bound to cause trouble later on. but shouldn't make NO files restored, maybe few files that was changed while backing up. ___ 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 don't work, handbook lies
On Sun, 31 Aug 2008 18:53:36 -0500 J.D. Bronson [EMAIL PROTECTED] wrote: dump -C 32 -0Lf - / | ( cd /mnta ; restore xf - ) One minor caveat: dumping a live filesystem require dump to take a snapshot, which in turn require soft-updates to be turned-on. The default in sysinstall is to enable it for everything but the root partition. ___ 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 don't work, handbook lies
dump -C 32 -0Lf - / | ( cd /mnta ; restore xf - ) One minor caveat: dumping a live filesystem require dump to take a snapshot, which in turn require soft-updates to be turned-on. The default in sysinstall is to enable it for everything but the root again - it will still dump file, maybe with few files missing but not the whole dump ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]