Another Solaris locked room puzzle.
Nov. 28th, 2005 12:34 pmMy task: to recover a box from three DATs created using find [mount point] -mount -print | cpio -ovc -C32768 > /dev/rmt/0 for each of root, /var and /usr. The reverse command is some variation on cpio -ivcdmu -C32768 -I /dev/rmt/0. But which variation?
Doing a complete install and splattering the tape contents across the file system gives a broken box. (Ever used a Windows install which has had components added or removed using a different version to the original install? Like that only so bad it won't even go into single-user.)
Booting from CD, I can't work out how to get the files where I need them mounting the relevant slice for each mount point on /mnt.
GNU cpio has --no-absolute-filenames (just what I need), but Solaris 8 cpio doesn't.
I tried running it in a chroot, but chroot looks for the command you give it inside the chroot, where of course it isn't (and nor are all the libraries it needs, and copying /usr/lib into the chroot isn't sufficient). Same for the tape drive. (Though I've worked around that one by dumping the cpio archive to the disk, and cpio can at least open the dumped copy.)
Note that I have no idea if the archives actually add up to a working system when applied to a bare box. At least the tapes are still good. For now. Note also the box is not networked and won't be unless and until it's restored — all I have is a bare machine, some Solaris 8 CDs and three DATs.
Ideas please!
(no subject)
Date: 2005-11-28 12:41 pm (UTC)(no subject)
Date: 2005-11-28 12:45 pm (UTC)(no subject)
Date: 2005-11-28 12:58 pm (UTC)I can go through the list with ldd, yes ...
(no subject)
Date: 2005-11-28 12:59 pm (UTC)Looks like it does have -s. But it's still horrible.
(no subject)
Date: 2005-11-28 01:03 pm (UTC)what exactly doesn't work about it if you untar it over an existing system? did you do a reconfiguration boot after? (and maybe backup the eeprom config and bootenv.rc...)
(no subject)
Date: 2005-11-28 01:07 pm (UTC)Gah. All Unix sucks.
(no subject)
Date: 2005-11-28 01:12 pm (UTC)(no subject)
Date: 2005-11-28 01:14 pm (UTC)Thankfully, failing well with a report afterwards counts as almost as successful as succeeding. Possibly more so, because it involves a Word document. Ah, conslutting!
(no subject)
Date: 2005-11-28 01:18 pm (UTC)(no subject)
Date: 2005-11-28 01:20 pm (UTC)(no subject)
Date: 2005-11-28 03:01 pm (UTC)Just a thought: compile GNU cpio?
Date: 2005-11-28 05:50 pm (UTC)>>GNU cpio has --no-absolute-filenames (just what I need), but Solaris 8 cpio doesn't.
Err... build GNU cpio on a nearby box?
Re: Just a thought: compile GNU cpio?
Date: 2005-11-28 06:02 pm (UTC)I suspect I shall be declaring this too stupidly difficult.
(no subject)
Date: 2005-11-28 06:03 pm (UTC)(no subject)
Date: 2005-11-28 06:04 pm (UTC)Re: Just a thought: compile GNU cpio?
Date: 2005-11-28 06:51 pm (UTC)(no subject)
Date: 2005-11-28 08:58 pm (UTC)How many discs? How many partitions?
Date: 2005-11-28 10:40 pm (UTC)If more that one, can you build a new system on that parition?
Also, which has higher priority: the DAT tapes or the hard drives?
(no subject)
Date: 2005-11-28 11:46 pm (UTC)Failing that, it's usually easiest to install a minimal environment (IIRC Solaris 8 minimal install is about 50MB -- but you may need to drag in some other things to do anything useful) onto a spare piece of disk (what is going to become the swap partition is traditional), boot off that, make the new file systems, and then restore the data onto the new file systems off tape. When done, turn the partition you were temporarily using back into swap.
Both approaches give you a "clean" restore, unpolluted by the artifacts of the restore process.
A minimal install and then splattering the restore over the top will probably also work and be moderately safe since basically everything in the minimal install should be in the tape to restore/overwrite. But beware that if they're headless servers then Solaris 8 minimal install includes bits of X that you may not want/may have removed.
Finally depending on the hardware situation it's not uncommon to simply pull the disks out and stick them in something else, run the restore there, and then move the disks back, when doing bare metal recovery.
Ewen
PS: If you've got the ability to specify how the backups are done to make this "bare metal" recovery possible, you might well want to suggest _not_ doing a "find /" to get the file names, but doing something like:
cd / && find * .[a-zA-Z]* ... | cpio ...
instead, so that you don't have to deal with absolute filenames. It makes restoring somewhere else much easier.
(no subject)
Date: 2005-11-28 11:48 pm (UTC)cd / && find . [other-find-args] | cpio ...
Since that'll give you ./whatever paths, which are "relocatable".
Ewen
Re: Just a thought: compile GNU cpio?
Date: 2005-11-29 04:10 am (UTC)I've actually done this with FreeBSD on crappy wintel hardware. Eased the pain quite a bit.
Re: Just a thought: compile GNU cpio?
Date: 2005-11-29 07:24 am (UTC)