RE: Informix Backups
Posted in 1998
Be warned. I tried this on our primary server and our read only
secondary server (HDR Replication)
The primary rightly returned a 5 (Online). The secondary however
returned a 2 (Recovery).
Could mess up your scripts if you are relying on the server being online
or quiescent.
As a matter of interest we are running 7.23 UC4 on HP-UX 10.01
Lee Robertson
Oracle DBA
Siemens Microelectronics Ltd
Tel 0191-2804037
> ----------
> From: Mark D. Stock[SMTP:mdstock@informix.com]
> Sent: Thursday, May 21, 1998 12:46 PM
> To: Coburn
> Cc: informix-list@iiug.org
> Subject: Re: Informix Backups
>
> Coburn wrote:
> >
> > (Try something like the following. I wrote it when I first started
> working
> > with informix. Its the first draft that never went anywhere but gets
> used
> > ofter. )
> > # The purpose of this script to to automate the backup of the
> database
> > # and to help ensure its integrity. The DB status is tested
> initially
> > # so that the DB can be restored to its pre backup status.
> > # Future mods will echo outputs to file and CRON the job. For now
> this will
> > # do
> >
> > # Function to test the status of the database prior to backup.
> > Status_func () {
> > if [ `onstat -g ntm | grep INFORMIX | awk '{print $5}'` = "On-Line"
> ]; then
> > DBSTATUS="1"
> > elif [ `onstat -g ntm | grep INFORMIX | awk '{print $5}'` =
> "Quiescent" ];
> > then
> > DBSTATUS="0"
> > elif [ `onstat -g ntm | grep INFORMIX | awk '{print $5}'` = "for"
> ]; then
> > DBSTATUS="2"
> > #echo "You must bring the DB online to back it up"
> > #exit
> > fi
> > }
>
> As a point of interest, you can check the current mode of IDS by
> checking the status ($?) after onstat -.
>
> The values returned by 'onstat -' are:
>
> -1 Offline
> 0 Initialisation
> 1 Quiescent
> 2 Recovery
> 3 Backup
> 4 Shutdown
> 5 Online
> 6 Abort
>
> Cheers,
> --
> Mark.
>
> +----------------------------------------------------------+----------
> -+
> |Mark D. Stock - Informix SA http://www.informix.com |////////
> /|
> |mailto:mdstock@informix.com http://www.iiug.org |///// /
> //|
> | +-----------------------------------+//// /
> ///|
> | Tel: +27 11 807 0313 |If it's slow, the users complain. |/// /
> ////|
> | Fax: +27 11 807 2594 |If it's fast, the users keep quiet.|// /
> /////|
> |Cell: +27 83 250 2325 |Therefore, "No news: travels fast"!|/
> ////////|
> +----------------------+-----------------------------------+----------
> -+
>