Script for QAD Database backup

sharikaganju

New Member
Hello All,

We have a script for our QAD production database backup called prod.bkup. And this is what it does -
#!/bin/sh
DLC=/progress/oe101c;export DLC
PATH=$PATH:$DLC;export PATH
PROMSGS=$DLC/promsgs;export PROMSGS
PROTERMCAP=$DLC/protermcap;export PROTERMCAP
# PASS IN $1 as blank or "online" to do an online backup
type=$1
$DLC/bin/probkup $type /qad/qaddb/mfgprod /qad/qaddb/mfgprod.bkp
$DLC/bin/probkup $type /qad/qaddb/admprod /qad/qaddb/admprod.bkp
$DLC/bin/probkup $type /qad/qaddb/hlpprod /qad/qaddb/hlpprod.bkp


So we run it using prod.bkup online.

I need to create another script which would run this script automatically and also copy the QAD backup files from the /qad/qaddb folder to the SAN. I have the IP address of the SAN.

How do I do this ? I might have to use sftp but I dont know how to automate all this process in a script. Also what files should I move from /qad/qaddb to SAN, would it be mfgprod.bkp, admprod.bkp and hlpprod.bkp ? Do I also need to transfer any bi files ? How do I identify them ? The backup is being done for restore purpose in case there is a database crash, so I need to know what all files do I copy to SAN so that we could restore from them.

Thanks in advance.
 

jurriaan

New Member
You don't mention how you can access the SAN, only that you know the IP-address.

Most SAN's I know are accessible as a share, or mounted on the server. If so, a simple copy command should do the trick.

Transfering bi files is not necessary, the backup process takes care of that. However, I do wonder if you use after imaging, given your questions.

Without after imaging, try thinking about this process:

backup takes place at midnight 00:00
Much work is done from 08:00 until 16:53, when the database crashes.
18:00, without any effort (you trained for this, wrote it down, tested it!) you have restored the database and tell your boss: we're back online.

boss logs in, says 'where are my sales/production data from today?'

you (starting to get red, feels temperature rising); uh - gone!

In short: you need after imaging, and you need to backup those files as well, and not just once a day, but in an interval where you're comfortable with compared to losing work. We use 15 minutes here.
 

sharikaganju

New Member
Thanks for the reply.

The SAN is accessible as a share. How can I know if my After imaging is there or not ?

Also how do a write a script to copy it automatically to SAN. And what all files should I copy ? I also need the backup script prod.bkup to be run automatic in the same copy script. How do I do that ? I am not very familiar with UNIX scripting so dont know what to write in the script.
 

dinesh1178

New Member
To automate the backup script, you need to use Cron (on Unix servers) or Windows scheduler (on Windows servers). You can use third party tools like Autosys too.
 

jurriaan

New Member
Thanks for the reply.

The SAN is accessible as a share. How can I know if my After imaging is there or not ?

I think, at this point, that you would benefit from sitting down and reading the documentation. There is no way that short answers on this forum are going to replace everything that Progress has written down about best practices.

Of course I can tell you how to check if After imaging is there.
Your next question will be on how to enable it.
Then how to use it
etc.

My advice would be to read the documentation, fiddle with it in a test-environment, become familiar with it so that when you need it, you don't need to ask here again (which would defeat the purpose of bringing your database back online soon).
 

RealHeavyDude

Well-Known Member
Exactly.

A comprehensive disaster recovery strategy utilizing after image should not be taken lightly. While it might be true that the attention Progress databases need are less than that from other providers, I say that every production database needs attention and a comprehensive disaster recovery strategy needs to be in place and tested regularly.

While we are willing to answer your questions, availability and protection against data loss are topics that must be on top of the agenda of every CEO whose business has any valuable assets in IT ( client information stored in a database for example to name just one ). At least he must ensure that somebody is responsible.

But, as my humble opinion does not match with what I find in the real world, I ask myself: Why is it that people are not concerned until they are hosed?

Just my 2 cents, RealHeavyDude.
 

TomBascom

Curmudgeon
Ditto.

For an overview of what after-imaging is, why it's important and how to go about using it: After Imaging, The DBA's Best Friend. You might also benefit from: Database Administration Worst Practices

Reaching out to a forum is a good first step but ultimately you need to spend some quality time with the documentation and actually work with this stuff. You can accelerate the process by getting some training and/or by bringing in an experienced consultant (see sig line). A forum like this is great for pointing you in the right direction, for answering quick questions and for pointing out the things that you don't know you need to know. It's not so good for training.
 

sharikaganju

New Member
Thanks everyone for your help and suggestions. While I go through these documents, coming back to my first question, can you please guide me to write a script that would automate running my prod.bkup online script and copying the backup files to SAN. We are on the UNIX operating system. So I will need to run the script in UNIX. I would need to create a script first and then run it using cron job in UNIX right. But I am not being able to write a script to do that. For now my major concern is to start doing backups. AI for me will be the next step. For now we are not doing backup's at all so I need to first get to a point where we atleast start doing backups. At present we are at such a stage where if our db is corrupt we dont have any data at all. I want to atleast reach a stage where we get atleast till yesterday's data. I am sure setting up AI in our DB is a big project in itself so for now I want to first concentrate on getting the backups to run. And then I will get going with the AI project. I need your help getting to that stage atleast.

Thanks in advance.
 
Top