Best way to backup SCO Xenix/UNIX

Curt J. Sampson curt at cynic.wimsey.bc.ca
Wed Apr 3 22:19:59 AEST 1991


In article <3599 at sixhub.UUCP> davidsen at sixhub.UUCP (bill davidsen) writes:

> In article <aris.670179095 at tabbs> aris at tabbs.UUCP (Aris Stathakis) writes:
> 
> | I'd like to know the best way to do a backup so that I can recover from
> | a FULL crash i.e. having to re-install on a different machine from 
> | a tape backup.  I'm sure there are lots of ways to do it, like using
> | the standard backup proggram SCO give you, but find it too inflexible.
> 
> [ Bill Davidson's hints deleted. ]

I now feel qualified to speak on this, having just installed my tape
drive and completed a marathon 12 hour backup/reformat/restore on my
system (SCO Xenix 2.3.2).

I have considered using backup/restore, but because you need one tape
per partition (and I hear that restore has problems restoring to a
partition that is a different size from the one backup backed up from)
I discarded any notions I had of using those.  As well, you also can't
tell backup to avoid certain subtrees which aren't worth backing up
(/usr/spool/news, for example) unless you give them a separate
partition.

I think that cpio is the best of the standard utilities for backup for
the following reasons:

  - you can store all of your files on one tape (if they fit)
  - your backups are completely independent of your partitioning
    scheme
  - you can easily choose which files you want to back up
  - you can easily restore single files (which is good when you have
    users who are a little trigger-happy with the delete command and
    come whining to you afterwards :-))

My standard backup scheme is

  cd / ; find . -depth -print | grep -v '^\./usr/spool/news | \
      cpio -oBcv >/dev/rct0

This will back up everything except the /usr/spool/news tree.
(There's not much point, IMHO, in backing up a file that's going to be
gone in four days anyway.  And if you back up news, your incrementals
get out of hand very quickly.  :-))  You can insert more grep -v
commands to avoid other stuff as well, if you like.  You could also
back up just particular sections if you like (e.g., 
"cd / ; find ./usr/local -depth -print | cpio ...").

This is my only backup scheme at the moment (no incrementals).  I
can afford to do a full backup quite often (every night or two),
because it's only 40 MB and it takes less than twenty minutes.
(Also, I only have two tapes right now.  :-))

One other thing to note is that when I do a find I cd to root and use
'find .' rather than just using 'find /'.  This lets me easily restore
stuff when I've booted from a floppy and mounted the hard drive root
partition on /mnt by just cd'ing to /mnt and doing a cpio -i.

For my first backup with this drive I backed up everything, including
news, because I needed to repartition my disk.  This was something of
an acid test of my backup system, actually, since I was essentially
simulating the dire situation proposed by Mr. Stathakis above.  You
suddenly begin to realize what a large and unfriendly place the
universe is when you realize that your entire system is sitting only
on a couple of DC600A tapes and your hard drive is empty.  :-)

At any rate, I booted from my floppy, ran fdisk and divvy, created the
stub directories, mounted all my partitions, and restored from the
tape (using cpio with the d and m options, of course).  I came back
after half an hour and all the files had been restored to their
proper places on their proper partitions with no intervention from
me.  I rebooted and everything worked just fine.

(Ok.  I'll admit it.  That's a baldfaced lie.  I broke my system quite
badly, and it took me many hours to get it running again.  But now
that I've done it once, I could do it again in less than three hours
with no problem whatsoever.)

So there you have it.  I think that find, grep and cpio are your best
friends when it comes to backing up.  Backup/dump and restore are
nonsense, IMHO, especially if you're like me and you have five
partitions, all of which are fairly small (25-40 MB each).

For those interested, I mailed an entertaining (or perhaps
not-so-entertaining) summary of those eventful twelve hours to the
sco-list mailing list.  Hopefully it will appear there in the next
couple of days.  If not, I can mail a copy to anybody who asks.

cjs
-- 
                        | "It is actually a feature of UUCP that the map of
curt at cynic.uucp         | all systems in the network is not known anywhere."
curt at cynic.wimsey.bc.ca |    --Berkeley Mail Reference Manual (Kurt Schoens)



More information about the Comp.unix.xenix.sco mailing list