Newsgroups: comp.unix.xenix.sco Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!batcomputer!cornell!uw-beaver!ubc-cs!van-bc!cynic!curt From: curt@cynic.wimsey.bc.ca (Curt J. Sampson) Subject: Re: Best way to backup SCO Xenix/UNIX Organization: Mad Artists' Technological Hangout Date: Wed, 3 Apr 1991 12:19:59 GMT Message-ID: <1991Apr3.121959.627@cynic.wimsey.bc.ca> Keywords: backup unix xenix sco References: <3599@sixhub.UUCP> In article <3599@sixhub.UUCP> davidsen@sixhub.UUCP (bill davidsen) writes: > In article aris@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@cynic.uucp | all systems in the network is not known anywhere." curt@cynic.wimsey.bc.ca | --Berkeley Mail Reference Manual (Kurt Schoens)