Gateway backup restore operation failed in version 8.0
search cancel

Gateway backup restore operation failed in version 8.0


Article ID: 42840


Updated On:


STARTER PACK-7 CA Rapid App Security CA API Gateway




Version 8.0 of the Layer 7 Gateway introduced cluster-independent identifiers (GOIDs) that are associated with each item in the Gateway database. This allows all items within the Gateway database to be uniquely identified even when moved between different clusters. This allows greater interoperability as well as increased flexibility as Gateway instances are migrated between different environments and installations. This resulted in a change in how the Gateway categorized and indexed the data stored within its database. A defect appeared in version 8.0 of the Gateway where the default GOID of a particular table was not set properly when backed up from an existing Gateway database.


A Gateway backup image may fail due to this error and print the following error messages when attempting to restore from a backup image that is influenced by this defect:
Restore of Gateway image partially succeeded. Please reboot to complete the process.?
Failed component: maindb

Additionally, the following error log may be printed when running the backup script in "verbose" mode:
Could not restore component 'maindb': Could not restore database: Invalid default value for 'esm_service_goid'?


This issue is resolved in version 8.1.0 of the Layer 7 Gateway. It was addressed in development incident?SSG-7730. An administrator or operator will need to take a new backup image from the Gateway in order for the change to take effect. Backup images taken at version 8.0.0 cannot be restored safely to version 8.1.0. Upgrade the Gateway and take a new backup image.


If upgrading the Gateway appliance is not available then the Gateway backup image will need to be manually modified to accommodate for the behavior. Log into the privileged shell of the Gateway appliance and perform the following steps:
mv -f /opt/SecureSpan/Gateway/config/etc/sql/ssg.sql /opt/SecureSpan/Gateway/config/etc/sql/ssg_backup.sql
touch /opt/SecureSpan/Gateway/config/etc/sql/ssg.sql
unzip /opt/SecureSpan/Gateway/config/backup/images/<name of backup> maindb/main_backup.sql
sed -i "s/DEFAULT '\\\\0\\\\0\\\\0.*',\s*termination_time/DEFAULT X'0000000000000000FFFFFFFFFFFFFFFF', termination_time/g" maindb/main_backup.sql
sed -i "s/DEFAULT '0\\\\0\\\\0\\\\0.*',\s*tls_key_alias/DEFAULT '0', tls_key_alias/g" maindb/main_backup.sql
zip /opt/SecureSpan/Gateway/config/backup/images/ maindb/main_backup.sql
rm -rf maindb/main_backup.sql
/opt/SecureSpan/Gateway/config/backup/ -v -image /path/to/image <your options>

mv -f /opt/SecureSpan/Gateway/config/etc/sql/ssg_backup.sql /opt/SecureSpan/Gateway/config/etc/sql/ssg.sql

At this point, the restore should complete without any issues. If further issues are experienced during this process then please open a new Layer 7 Support case.


Component: APIGTW