Back-ups to Disk?
Posted in 1993
I have doing backups to disk for about 2-1/2 years. I created a very large disk partition for my archive to go to. After the archive runs at night, this unix file is taken off on tape. The only problem I have had is when my backup partition is not large enough. My current backup partition is 37 MB and I am just about out of room. I create an empty file in the backup partition, I then set the informix tape device to point to this empty file (in my case /bkup2/dblog). I set the tape size as large as my partition is. From cron I run my backup script. Crontab entry is: 50 19 * * 1-5 ulimit 40240000; /bin/su informix -c "/usr/informix/local/bkup" This sets the ulimit very high so I can create this large file (may not be necessary on your system) It then su's to informix and executes the script /usr/informix/local/bkup. Here is a copy of that script. -----------------------cut here ------------------------------------------- - #makes sure you have an empty file (pretend your mounting a tape) #also sets permissions cp /dev/null /bkup2/dblog chmod 666 /bkup2/dblog touch /bkup2/dblog #sets engine to Turbo (may already be set, just a precaution) SQLEXEC=/usr/informix/lib/sqlturbo export SQLEXEC # put Turbo in Quiescent mode (My version is very old and the database # must be in Quescent mode for an archive) /usr/informix/bin/tbmode -u #removes old copy of archive (we do not have room for two copies on #the same disk) rm /bkup2/archive #archives database - system messages are stored in file bkup.out /usr/informix/bin/tbtape -s > /usr/informix/local/bkup.out <<+ + #copies archive to new file (pretend your unmounting a tape and labeling #it) also sets permissions mv /bkup2/dblog /bkup2/archive cp /dev/null /bkup2/dblog chmod 666 /bkup2/dblog # puts Turbo back online /usr/informix/bin/tbmode -m #mails file bkup.out to me so I can check for error messages, etc. mail jgeary < /usr/informix/local/bkup.out ---------------cut here---------------------------------------------------- I have not had any problem restoring from disk. I move the file archive back to the name dblog and run a restore. It takes me about an hour to do an archive and an hour to restore it. If you have any questions, give me a call. Jane Geary Red River Army Depot Comm (903)334-2358