Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cron backup with multiple volumes

Status
Not open for further replies.

laurin1

MIS
Apr 28, 2003
77
US
Can this be done? My backup works fine with single volumes, but when it runs over, my script emails me the log and it's asking for a new tape. However, it appears to exit right after that.

Here's the script:


Code:
#!/bin/sh

echo "$(date) Starting nightly system backup..."
find /rmi/RM5/rm5.dbs -print | backup  -i  -q -v -f /dev/rmt0 > /backup.log 2>&1
ret=$?
echo "$(date) Backup returned $ret and output is: " 
output=`grep ".*" /backup.log`
echo $output

and here's the log that is sent to me (i cut out some of the file list to shorten this):
Code:
Sat Sep 23 01:00:01 CDT 2006 Starting nightly system backup...
Sat Sep 23 04:08:30 CDT 2006 Backup returned 2 and output is: 
Backing up to /dev/rmt0. Cluster 51200 bytes (100 blocks). Volume 1 on /dev/rmt0 a 0 /rmi/RM5/rm5.dbs a 71680 /rmi/RM5/rm5.dbs/syscolumns.idx a 126976 /rmi/RM5/rm5.dbs/syscolumns.dat a 32768 /rmi/RM5/rm5.dbs/sysindexes.idx a 19456 
.........
/rmi/RM5/rm5.dbs/s_grp00228.idx a 3072 /rmi/RM5/rm5.dbs/s_grp00228.dat a 16967680 /rmi/RM5/rm5.dbs/note500596.idx a 366820352 /rmi/RM5/rm5.dbs/note500596.dat a 133120 /rmi/RM5/rm5.dbs/c5pay00597.id!
x Mount volume 2 on /dev/rmt0. Press Enter to continue.


*****************************************************************
	cron: The previous message is the standard output
	and standard error of one of the cron commands.

Keith Davis
MCSA, A+, N+, Guru+, Geek+, Child of God++++++
Love and Service
 
Hi Keith. I'm not entirely sure that this will help, but the AIX backup command supports the -p option to perform compression on files < 2Gb at the time of writing to tape. The man page says:

-p Specifies that the files be packed, or compressed, before they are archived. Only files of less than 2GB are packed.

Note: This option should only be used when backing up files from an inactive filesystem. Modifying a file when a backup is in progress may result in corruption of the backup and an inability to recover the data. When backing
up to a tape device which performs compression, this option can be omitted.

Does your backup still show in a ps listing after such an event? If not, I'm wondering whether the prompt eventually times out and aborts - perhaps someone else knows.

I don't mind people who aren't what they seem. I just wish they'd make their mind up.

Alan Bennett.
 
I don't know how backup, when run from cron, reacts these days to this situation. I seem to recall a while ago, backup sees no stdin - so no answer, but the first tape is/was still in the drive, so second volume was written over the same tape, thereby rendering the backup tape useless.

If you can set the drive to a higher density, perhaps that will circumvent the problem? Also, if you have spare disk space, you could make the backup to a file/filesystem, and the next day copy that file to tape and then you'd be able to load a new tape when prompted to do so.

Or invest in a network-backup software+hardware (TSM+tapedrive_library or the like)


HTH,

p5wizard
 
I agree with p5wizard in that you run the risk of overwriting here. Apart from the other options and/or investment suggested, you might also consider carrying out incremental backups using the -Level option of backup, though these can get tricky if databases like Oracle are involved.

I don't mind people who aren't what they seem. I just wish they'd make their mind up.

Alan Bennett.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top