Check if the back up taken by onbar command in Informix database 12.1 is successful or not?

505 Views Asked by At

This problem made me vexed with Informix. When the same backup command has been issued with the onbar command by two different members of bargroup at the same time from different sessions and one backup has failed and the other back up is successful. How can I identify which onbar command issued by a member is successful, using a technique which is based on bar_act.log file and not based on the return code of onbar?

2

There are 2 best solutions below

1
On

I believe you're looking for the onbar -v command/option to verify backups. You can look at onbar -v: verifying backups in the manual for more information.

onbar -v
onbar -v -w             # Whole system backup
onbar -v -f filename    # Spaces listed in file
onbar -v space1 …       # Spaces listed on command line

With options -t time for checking point-in-time recoverability, and -p for checking a 'physical only' backup.

Behind the scenes, onbar -v uses archecker. You might need to use onsmsync too.

I've not used this myself.

2
On

The bar_act.log contains the PID of the On-Bar process, so you can uniquely identify the process that failed.

2015-03-13 08:25:11 24098 24096 /usr2/gcastro/instances/gac1210fc5/bin/onbar_d complete, returning 0 (0x00)

Here 24098 is the PID of the main onbar process and 24096 the PID of the parent. The message always has the same format so you can parse it and ge the return code from it also.