1

Currently, I have a simple backup process in which a script is run daily via cron. If there's a tape in the drive, it will use cpio to backup critical files, with a full system backup done once a week. For the most part, this works fine.

However, the issue that arises is every now and again, the weekly backup will fail with the following error:

UX:cpio: ERROR: Cannot open "/dev/tty"

This is pretty much always just a case of the current tape being full, and cpio not being able to access a controlling terminal to prompt for the next tape, due to running as a cronjob. Runnning the script manually the next morning works fine.

However, manually running the backup is suboptimal, due to a full system backup taking around five hours, during which time the system is in peak use (and thus prone to change mid-backup). Having it run automatically overnight is vastly preferable.

Cleaning the system of unnecessary files so as to fit within a single tape can only take me so far.

Is there any way to automate a backup job which can span tapes? I do have a second tape drive which I'd be able to add to the server, but not sure if that would help. I would prefer to keep using cpio rather than go through all the stresstesting/documentation of a completely new backup system unless absolutely necessary.

For the record, I am running SCO OpenServer 6.

goldPseudo
  • 1,106
  • 1
  • 9
  • 15

2 Answers2

2

One of your options with two drives is to run two separate cpio jobs at the same time backing up different parts of the system. The challenge then would be finding the dividing line that works for you. Another advantage is that the total backup would be done faster as long as the data buses aren't saturated.

That doesn't scale if your backup needs more than two tapes.

Dennis Williamson
  • 60,515
  • 14
  • 113
  • 148
2

I remember, from ages ago, that I was doing something like using expect to run the backup and using a symbolic link to the device instead of the real device (pointing firstly to the first tape), so when the end of tape is detected you change the link to the second tape, then send <RETURN> to the backup command and it will continue with the second one.