[comp.unix.xenix] File system dump and restoration

mikej@lilink.UUCP (Michael R. Johnston) (07/14/89)

On our Altos machines at work we have a utility called "dump.hd" which
dumps the entire root filesystem to tape. By using this program on
can create a COMPLETE image of the hard drive that can be used to restore
a crashed system etc. 

Looking through the SCO Xenix manuals I note the statement:

	"It is not possible to completely restore an active root filesystem."

I can understand SCO's reasons for this however I sense that there must be a
way to do this. It would make my life much easier since if a system crashed
I'd only need to use the following steps (as I do on the Altos) to restore
the entire system:

	1- Boot from floppy
	2- Restore root file system to hard drive.
	3- Boot from hard drive.
	4- Restore the most recent tar backup (data files.).

By following these steps I have a complete re-installation WITHOUT having
to manually restore the O/S. Does anyone know of a reliable way of doing
this? I've been told that "dd" will not do the job.

Thanks.
---
Michael R. Johnston
System Administrator                           rutgers!lilink!mikej
LILINK Public Access Xenix  (516) 872-2137/2138/2349 1200/2400 Login: new

clewis@eci386.uucp (Chris Lewis) (07/18/89)

In article <775@lilink.UUCP> mikej@lilink.UUCP (Michael R. Johnston) writes:
>Looking through the SCO Xenix manuals I note the statement:
>
>	"It is not possible to completely restore an active root filesystem."

>I'd only need to use the following steps (as I do on the Altos) to restore
>the entire system:

>	1- Boot from floppy
>	2- Restore root file system to hard drive.
>	3- Boot from hard drive.
>	4- Restore the most recent tar backup (data files.).

This is perfectly possible using "dd" or any other copying utility being
used to create a disk image.  The key point is "an active root filesystem" -
they're referring to doing the "dd" while the system is *running* on
the root filesystem in question - obviously, if the root filesystem
changes while you're backing it up (particularly with an image backup)
there may be inconsistencies introduced.  So, do the backup when root
isn't mounted, eg: boot off the floppy and do your backup of the harddisk 
root and it'll work.

Though, during restore, add the following point:
	1a) if neccessary (new drive or completely shmucked VTOC, 
	    badblocks or whatever), reformat and repartition the main drive.
	    (if you're making image backup, the partitioning *must*
	    stay the same)
-- 
Chris Lewis, R.H. Lathwell & Associates: Elegant Communications Inc.
UUCP: {uunet!mnetor, utcsri!utzoo}!lsuc!eci386!clewis
Phone: (416)-595-5425

macy@fmsystm.UUCP (Macy Hallock) (07/20/89)

In article <775@lilink.UUCP> mikej@lilink.UUCP (Michael R. Johnston) writes:
>On our Altos machines at work we have a utility called "dump.hd" which
>dumps the entire root filesystem to tape. By using this program on
>can create a COMPLETE image of the hard drive that can be used to restore
>a crashed system etc. 

I have tried to restore SCO systems several times using tar, dd, cpio
and other methods, with little luck.  This makes upgrading to a new
hard disk a burdensome task.  SCO is little help.  I suspect this
is part of their serialization/copy protection scheme.  It's defintely
a blemish on an otherwise sound and useful product.

The best advice I received so far is in the articles from "Discover"
(SCO's magazine/newsletter) I got via anonymous uucp from SCO
(/usr/spool/uucppublic/SLS/xnx114.z from sosco).  A previous
article in this group gave the details on this.

(To give credit where credit is due: SCO has the right idea with
posting updates/info this way.  Keep it up, SCO - how 'bout posting
the rest of the updates/supplements this way - its got to save SCO
a bundle in 800 line time, and it lets the technical people out
here in the field do our job better AND make SCO more attractive
to us and end users to boot)

I am going to try a backup using an outside vendor's backup package,
but I'm not sure I'll get good results.  I am not a good enough
wizard to fathom SCO's method here.

Ross, you got anything to say about this?

            Macy Hallock                 fmsystm!macy@NCoast.ORG
           F M Systems, Inc.             hal!ncoast!fmsystm!macy
           150 Highland Dr.              uunet!aablue!fmsystm!macy
           Medina, OH 44256              Voice: 216-723-3000 X251  
 Disclaimer:  My advice is worth what you paid for it. Your milage may vary.

sl@van-bc.UUCP (Stuart Lynne) (07/21/89)

In article <19@fmsystm.UUCP> macy@fmsystm.UUCP (Macy Hallock) writes:
>In article <775@lilink.UUCP> mikej@lilink.UUCP (Michael R. Johnston) writes:
>>On our Altos machines at work we have a utility called "dump.hd" which
>>dumps the entire root filesystem to tape. By using this program on
>>can create a COMPLETE image of the hard drive that can be used to restore
>>a crashed system etc. 
>
>I have tried to restore SCO systems several times using tar, dd, cpio
>and other methods, with little luck.  This makes upgrading to a new
>hard disk a burdensome task.  SCO is little help.  I suspect this
>is part of their serialization/copy protection scheme.  It's defintely
>a blemish on an otherwise sound and useful product.
>

Steps to backup and restore a root filesystem for SCO.

	Assumptions: Working system with tape drivers installed.

	1. Use sysadmin to do an unscheduled backup.
	2. Use mkdev fd to create a bootable, root floppy.
	3. Verify backup is correct.
	4. Verify bootable floppy is good.
	5. Remove hard disk.
	6. Install and format new hard disk.
	7. Use your SCO N1 disk to partition and make a root filesystem 
	   on new hard disk.
	8. Reboot off hard disk to verify that it is working.
	9. Use DEL to stop installation onto hard disk.
	10.Reboot off bootable floppy.
	11.Restore from backup, e.g. restore rf /dev/rct0 /dev/hd0root

This works fairly well. The first trick is in using the N1 disk to partition
and create a filesystem on the new drive. The second is to have a good
bootable floppy with a kernel with your tape drivers installed.

I havn't tried it, but I assume that a backup to floppies would also work.

-- 
Stuart.Lynne@wimsey.bc.ca uunet!van-bc!sl 604-937-7532(voice) 604-939-4768(fax)

eli@robechq.UUCP ( Robec Horsham PM) (07/21/89)

In article <19@fmsystm.UUCP> macy@fmsystm.UUCP (Macy Hallock) writes:
>In article <775@lilink.UUCP> mikej@lilink.UUCP (Michael R. Johnston) writes:
>>On our Altos machines at work we have a utility called "dump.hd" which
>>can create a COMPLETE image of the hard drive that can be used to restore
>>a crashed system etc. 
>
>I have tried to restore SCO systems several times using tar, dd, cpio
>and other methods, with little luck.  This makes upgrading to a new
>hard disk a burdensome task.  SCO is little help.  I suspect this
>is part of their serialization/copy protection scheme.  It's defintely
>a blemish on an otherwise sound and useful product.

I don't think concerns about serialization are the problem, since
SCO release disks can be installed many times without problem.  There
are so many little nuances for doing a correct root filesystem restore
(like the target filesystem must be same size or larger than the one
backed up, the filesystem being restored) that SCO probably feels that 
it just easier (and safer) to rebuild the system from the ground up.  
Do you have an accurate log of what your divvy table looks like?  The 
latest sysadm manual suggests tailoring your own backups using tar.

* BUT, you guys are right.  A neat, clean, one-shot restore would
  help all of us.

>(To give credit where credit is due: SCO has the right idea with
>posting updates/info this way.  Keep it up, SCO - how 'bout posting
>the rest of the updates/supplements this way - its got to save SCO

The fixes that aren't posted are those that contain a large portion
of the complete product and the reason for this should be obvious.

-- 
           *********************************************
            Eli Levine              @Robec Distributors
                                    (215) 675-9500
           *********************************************

davidsen@sungod.crd.ge.com (William Davidsen) (07/22/89)

There are two ways to dump/restore a root filesystem. The right way is
to make a bootable floppy (mkdev fd) and execute the restore program
after booting from floppy. You can format, badtrk, etc, by hand or use
N1 to do it.

The klunky way is to use N1 to make a partial install, boot the hard
disk and then restore your cpio (must be cpio) with the 'u'
(unconditional) option. Then reboot!!

I have been doing this on Xenix since 2.1.2, and have had no trouble.
	bill davidsen		(davidsen@crdos1.crd.GE.COM)
  {uunet | philabs}!crdgw1!crdos1!davidsen
"Stupidity, like virtue, is its own reward" -me

bill@bilver.UUCP (Bill Vermillion) (07/22/89)

In article <19@fmsystm.UUCP> macy@fmsystm.UUCP (Macy Hallock) writes:
....
>I have tried to restore SCO systems several times using tar, dd, cpio
>and other methods, with little luck.  This makes upgrading to a new
>hard disk a burdensome task.  SCO is little help.  I suspect this
>is part of their serialization/copy protection scheme.  It's defintely
>a blemish on an otherwise sound and useful product.
............
>I am going to try a backup using an outside vendor's backup package,
>but I'm not sure I'll get good results.  I am not a good enough
>wizard to fathom SCO's method here.

You might look into a program called C-Tar, distributed by Microlite in
Philadelphia (I think?).

I have it installed on a site with several systems.  Though I have not done a
full restore (and haven't had the time to wipe out a disk and bring it back)
it backs up everything, including the /dev files.   To bring a system back all
you have to do is get a minimum kernel running and install the software
package.

(I am going to try wiping out the system and restoring it soon.  I finally got
a machine of my own to play around with that won't cause hemorages and heart
attacks if I crash it  :-) :-)  .)

-- 
Bill Vermillion - UUCP: {uiucuxc,hoptoad,petsd}!peora!tarpit!bilver!bill
                      : bill@bilver.UUCP

bob@wyse.wyse.com (Bob McGowen x922-4312 Training) (07/22/89)

In article <195@van-bc.UUCP> sl@van-bc.UUCP (Stuart Lynne) writes:
>In article <19@fmsystm.UUCP> macy@fmsystm.UUCP (Macy Hallock) writes:
>>In article <775@lilink.UUCP> mikej@lilink.UUCP (Michael R. Johnston) writes:
>>>On our Altos machines at work we have a utility called "dump.hd" which
>>>dumps the entire root filesystem to tape. By using this program on
---deleted
>Steps to backup and restore a root filesystem for SCO.
>
>	Assumptions: Working system with tape drivers installed.
---also deleted
>I havn't tried it, but I assume that a backup to floppies would also work.
>

Negative, unless you have a second floppy drive.  (If 360k second drive,
then your backup would have to be to it -- :-(  )  You cannot remove
the boot floppy in floppy drive 0 to get at the floppy backups.

I believe the following would work to "restore" a root fs on a floppy
only system:

	 1)  Backup up /dev/root using cpio (in single user mode this
	     should be the only fs available);
	 2)  get a copy of cpio on a floppy (tar it!!);
	 3)  verfy both, replace the disk, install with the N1
	     disk, and reboot onto the hard disk;
	 4)  tar cpio onto the hard disk;
	 5)  move /xenix to /something;
	 6)  restore the /dev/root files with cpio -idum...

Depending on how you used tar to get cpio on the hard disk, you may or
may not see an error message when it tries to overwrite itself with
the cpioed version.  By moving xenix to something else you avoid this
problem when the "proper" kernel file is loaded.

I will be trying this procedure out myself in the coming week.  If you
have any problems, e-mail me, I'll see if I can help.


Bob McGowan  (standard disclaimer, these are my own ...)
Customer Education, Wyse Technology, San Jose, CA
..!uunet!wyse!bob
bob@wyse.com

barton@holston.UUCP (barton) (07/23/89)

In article <19@fmsystm.UUCP>, macy@fmsystm.UUCP (Macy Hallock) writes:
> In article <775@lilink.UUCP> mikej@lilink.UUCP (Michael R. Johnston) writes:
> >On our Altos machines at work we have a utility called "dump.hd" which
> >dumps the entire root filesystem to tape. By using this program on
> >can create a COMPLETE image of the hard drive that can be used to restore
> >a crashed system etc. 
> 
As long as you are restoring to a hard disk that is physically identical.

> I have tried to restore SCO systems several times using tar, dd, cpio
> and other methods, with little luck.  This makes upgrading to a new
> hard disk a burdensome task.  SCO is little help.  I suspect this
> 
Here is a short simple backup script I have used several times to    
completely backup  my system, once when I upgraded my HD. It was
originally published in U/World. restoring went without a hitch!
:     
#  @(#)	bufull Full Backup Utility (no special files)
#
date > /usr/bin/lastbackup
find / -type f -print >/tmp/bu.files
tar cvF6 /tmp/bu.files  # 6 means /dev/rct0
rm -f /tmp/bu.files
 
Thanks Rich! (to restore, login  as root and type "tar xv6")
-- 
Barton A. Fisk          | UUCP: {attctc,texbell,vector}!warble!holston!barton
PO Box 1781             | (PSEUDO) DOMAIN: barton@holston.UUCP     
Lake Charles, La. 70602 | ----------------------------------------
318-439-5984            | +++++ "Hal, open the pod bay doors" --- Dave

blume@netmbx.UUCP (Heiko Blume) (07/29/89)

in the sco directory book you'll find 'CTAR' a tar compatible prgm
that claims to be able to backup the complete file system including
devices etc. i'd like to hear if it really works...
-- 
Heiko Blume,Seekorso 29,D-1000 Berlin 22,VOICE=(+49 30)365 55 71,BBS=()365 75 01
TELEX=184174 intro d,FAX=()882 50 65|ARPA  =crash!pnet01!pro-cess!blume@nosc.mil
PSI  =PSI%45300043109::netmbx:blume |BITNET=pro-cess.UUCP!blume@PSUVAX1
UUCP =blume@netmbx.UUCP             |INET  =blume@pro-cess.cts.com