Link to home
Start Free TrialLog in
Avatar of dagatorman
dagatorman

asked on

Backing up files or imaging the disk of a SCO Unix computer

I was recently given the assignement of taking care of a SCO UNIX 5.0.5 box, but I am not an UNIX expert so I am asking for some help.

It's currently backing up the entire hard drive on to an internal DDS-4 tape drive with a CRON job running a script for bunch of CPIO commands.  But I think it's failing to back up everything. First two commands backs up other volumes but when it comes to the most important volume, I get an error message that goes something like this.

Level 0 Backup of filesystems /dev/u

CPIO: Can't Open /dve/tty for writing
cbackup: backup not recorded.

I really need to figure out how to work this but I know not much about Unix computers and 3 books I have doesn't really explain much else.

What I would like to do right away is to get an duplicate image on another hard drive for this.  I know programs like Norton's Ghost or True Image can copy an image of the hard drive to another hard drive or to a CD burner.  Is there anything like that for UNIX volumes or hard drives?  

Plus if you can explain to me a backup script for SCO Unix, I would greatly appreciate it. Thanks.
Avatar of gheist
gheist
Flag of Belgium image

UNIX had dd command to duplicate disks
Norton's ghost etc do not copy drive image, they copy FAT files.

Could you please post your backup script for anyone to explain???
Avatar of yuzh
yuzh

To backup the full system, you can use the following command:

find / -print | cpio -oacv -O /dev/nrStp0

# please remember to replace "/dev/nrStp0" with the real tape device name in your
   system.


If you want to know what's wrong with your backup script, please post it here.
"CPIO: Can't Open /dve/tty for writing"

This makes me think that there might be a missing quote or something that is causing it to try to write to the tty vice the tape drive.

I would highly recommend Microlite BackupEdge software.

First, once you have the software installed, you will be able to backup the entire system to tape via a cron job.

Second, If a harddrive fails and you have to recover.  It is super easy to recover the system with BackupEdge.  I have talked non-technical people through restores over the phone.

BackupEdge is a relatively cheap solution to back up the system.

Without the script it would be difficult to troubleshoot more.
isnt it advertising ???
gheist,

Um, perhaps.  I didn't think it was, because it is a valid potential solution to his problem of not getting his system backed up.

If it is, I appologize, because that wasn't my intension.

Craig.
Avatar of dagatorman

ASKER

Well the CPIO command cron job used to work but now it's not working so I guess  figuring out why would be good, but  right now I'm looking for anything that will give me backups.. so I asked for any 3rd party software for UNIX out there that I could use so Robnhood was correct to offer me a software solution. I don't mind that at all.

I will check in to Microlite software but I will also try to track down the entire script and I will try to post it on here as soon as possible for your expert comments.

Thanks.
the command in the bscript that I found is.

/usr/lib/sysadmin/cbackup 0 200000 /dev/nrStp0 / dev/root
/usr/lib/sysadmin/cbackup 0 100000 /dev/nrStp0 / dev/boot
/usr/lib/sysadmin/cbackup 0 90000 /dev/nrStp0 / dev/u
tape rewind /dev/rStp0


The first two commands works and backs up the root and the boot volume. It fails when it tries to backup the u volume.

Does that help any?

Thanks.
What does the script cbackup do?
There is no problem with SCO 'cpio", I has used it for years from SCO 3.x to SCO 5.x,
my fullsystem backup script is using "cpio", I use the same script for all the SCO sites
(400+) at that time, and I don't have any problem.

It might be a problem with " /usr/lib/sysadmin/cbackup ", please post the file.

You can use the following script to  perform a full system backup:

#!/bin/ksh
tape rewind /dev/rStp0
find / -print | cpio -oacv -O /dev/rStp0
if  [[ "$?" -ne 0 ]] ; then
    echo "Problem with backup"
else
    echo "Backup complete "
fi
exit

# End of script
This is the "cbackup" script.  I hope this helps.


{{Proprietary software deleted by jmcg during cleanup}}


And this is the output of the backup job.  I'm confused as why it won't back up the last volume, when it can the first two.

Level 0 back up of file system: /dev/root
backing up All files

Generating a list of pathnames for backing up . . .
642000 Blocks

Level 0 back up of file system: /dev/boot
backing up All files

Generating a list of pathnames for backing up . . .
16300 Blocks

Level 0 back up of file system: /dev/u
backing up All files

Generating a list of pathnames for backing up . . .
cpio: can't open /dev/tty for writing
cbackup: Backup NOT recorded
I would change the first line of the script to be set -x

and I would execute the command

/usr/lib/sysadmin/cbackup 0 90000 /dev/nrStp0 /dev/u

That may yield more interesting error messages.
ASKER CERTIFIED SOLUTION
Avatar of sppalser
sppalser
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I tested the new tape by just entering the command below as suggested by Robnhood.

/usr/lib/sysadmin/cbackup 0 90000 /dev/nrStp0 /dev/u

and this is the response I got.

Level 0 backup of filesystem: /dev/u
Backing up all files

Generating a list of pathnames for backing up . . .
Reached end of medium on output.
Device /dev/nrStp0: Insert volume 2 and press <Return> to continue, or q to quit
.  

What does this mean?  I'm currently using DDS-1 tape, do I need to just get DDS-2 (longer) tapes? or do i have to make other adjustments?   Thanks for all of your help.
no - you need to interact with /dev/tty and change tapes accordingly...
If you are using DDS-1 tapes and your tape drive is a DDS-2 then yes buy some 120meter DDS-2 tapes.  A DDS-2 tape drive with DDS-2 tapes should give you up to 8GB of storage per 120-meter tape.  However if your tape drive is DDS-1 then you are kind of stuck unless you are using 60meter tapes now.  If you are using 60meter and your tape drive is DDS-1 then you should be able to find some 90meter tapes that might help you in the short term.  

How much disk storage do you have in your system?  If you have more than 2-3GB of disk storage and a DDS-1 tape drive it would be worth while to consider upgrading your tape drive and tapes.
dagatorman -

Please do not post copyrighted code on EE unless doing so is permitted explicitly by the copyright notice or some well-known license referred to by the copyright notice. It is a violation of the code owner's copyright as well as of the EE Membership Agreement. I have deleted the SCO-proprietary cbackup script.

jmcg
EE Cleanup Volunteer (also a Page Editor)