I am having a hard time using the Onbar tool (which relies on Onpsm primary storage manager for Informix db (server 12.1) using the cloud device (AWS s3).
https://www.ibm.com/support/knowledgecenter/SSGU8G_12.1.0/com.ibm.bar.doc/ids_bar_526.htm
- On the backup server, I have created a a DBSPOOL and LOGPOOL devices using commands similar to the following
onpsm -D add AMAZON1 \ -g DBSPOOL \ -p HIGHEST \ -t CLOUD \ --url https://ifmx-s3-dev.s3.amazonaws.com \ --provider S3 \ --user AKIAIT1111155555X4PA \ --password A2nB21111155555nvTI0X9ZxGzUJNJivoBQY9MrD \ --container ifmx-s3-dev \ --max_part_size 25600
- I then setup a cron job to perform a standard, level-0 backup of all online storage spaces and used logical logs.
onbar -b -L 0
onbar -b -l
- Reading the following IBM publication which advises to backup the storage catalog tables since are not backed up with the database instance, I set up a cron job to backup the $INFORMIXDIR/etc/psm which is supposed to contain the storage catalog tables
https://www.ibm.com/support/knowledgecenter/SSGU8G_12.1.0/com.ibm.bar.doc/ids_bar_526.htm
Copied $INFORMIXDIR/etc/psm directory and $INFORMIXDIR/etc/ixbar.? from the source server to the target and renamed the ixbar.? file replacing the IBM Informix server name that is used on the source computer with the IBM Informix server name of the target computer.
3- Changed ownership of the copied /psm directory and the ixbar file to user informix
4- Shutdown the db to perform a cold restore
onmode -yuk
5- Checked that the backup objects are there
onpsm -O list
6- Attempted to restore data and the critical files during the cold restore
onbar -r -cf yes
Got this weird error:
the environment variable BAR_BSALIB_PATH must be set in order to use the -cf option!
I checked the BAR_BSALIB_PATH in the ONCONFIG file and it is set to $INFORMIXDIR/lib/libbsapsm.so Even done this BAR_BSALIB_PATH="/opt/informix-12.10.fc10/lib/libbsapsm.so" :/home/informix echo $BAR_BSALIB_PATH /opt/informix-12.10.fc10/lib/libbsapsm.so
Still the same error!
7- Regenerate the emergency boot file - If the ixbar file is not empty and contains object data, onsmsync -b updates the sysutils database and the ixbar file so that they are in sync.
onsmsync -b
bar_act.log
2018-07-20 00:19:07 25656 25370 (-43207) Unable to open connection to database server: . 2018-07-20 00:19:07 25656 25370 onsmsync complete, returning 155 (0x9b) 2018-07-20 00:21:24 25933 25931 /opt/informix-12.10.fc10/bin/onbar_d -r
8- Restore the data
onbar -r
Warning: Parameter's user-configured value was adjusted. (ALARMPROGRAM) gzip: stdin: unexpected end of file
gzip: stdin: unexpected end of file
9- The server came back in fast recovery mode
10 - bar_dbug.log
GET /awwdst13a/rootdbs/0/rootdbs.377.1 HTTP/1.1
then failure messages like * Failed writing body (0 != 16347) * Closing connection 0 2018-07-20 00:21:25 25937 25933 smtranid.c:155 Object Transaction List was empty. 2018-07-20 00:21:27 25933 25931 bar_ixbar_list: enter 2018-07-20 00:21:27 25933 25931 bar_ixbar_list: return 0 (0x00) 2018-07-20 00:21:27 25933 25931 bar_build_timeline: enter 2018-07-20 00:21:27 25933 25931 bar_build_timeline: return 0 (0x00) 2018-07-20 00:21:27 25933 25931 smcatalog.c:521 nsmOpenDatabase: Count: opened = 9, missing = 0. 2018-07-20 00:21:27 25933 25931 smtranid.c:84 Object Transaction List was empty. 2018-07-20 00:21:27 25941 25933 smcatalog.c:521 nsmOpenDatabase: Count: opened = 9, missing = 0. 2018-07-20 00:21:27 25941 filter write_to_filter: Write failed on parent's output pipe. errno = 32.. 2018-07-20 00:21:27 25941 filter
write_to_filter: Error writing to handle/fd 17 located at 0x1e05930.
11- bar_act.log
2018-07-20 00:21:27 25945 25933 Successfully connected to Storage Manager. 2018-07-20 00:21:27 25933 25931 Begin cold level 0 restore rootdbs (Storage Manager copy ID: 0 377). 2018-07-20 00:21:40 25945 25933 Informix Primary Storage Manager session 867 closed 2018-07-20 00:21:40 25945 25933 The child process for the backup and restore filter is terminating with exit code 0. 2018-07-20 00:21:41 25933 25931 Completed cold level 0 restore rootdbs.
2018-07-20 00:21:41 25969 25933 Begin cold level 0 restore api7dbs (Storage Manager copy ID: 0 381). 2018-07-20 00:21:42 25968 25933 Informix Primary Storage Manager session 869 opened. 2018-07-20 00:21:42 25968 25933 Successfully connected to Storage Manager. 2018-07-20 00:21:42 25968 25933 Starting Filter /usr/bin/gunzip. 2018-07-20 00:21:42 25968 25933 Informix Primary Storage Manager session 869 closed
2018-07-20 00:21:44 25971 25933 Begin cold level 0 restore dat2dbs (Storage Manager copy ID: 0 380). 2018-07-20 00:21:51 25983 25971 There are no more bytes to read. ISAM Error = 0. OS Error = 10 (No child processes). 2018-07-20 00:21:51 25983 25971 XBSA Error: (BSAGetData) A system error occurred. Aborting XBSA session. 2018-07-20 00:21:51 25983 25971 Informix Primary Storage Manager session 875 closed 2018-07-20 00:21:51 25983 25971 The child process for the backup and restore filter is terminating with exit code 0. 2018-07-20 00:21:53 25971 25933 Unable to close the storage space restore: The physical restore was not completed.. 2018-07-20 00:21:53 25971 25933 Process 25971 25933 completed. 2018-07-20 00:21:53 25933 25931 (-43246) The ON-Bar process 25971 exited with a problem (exit code 131 (0x83), signal 0).