In a GBase 8s HAC cluster, after a failover the new primary generates its own logical log backups. If you later need to recover the original primary using a full backup, you’ll want those post‑switch logs too. This post demonstrates how to merge PSM backup catalogs from two nodes using onsmsync, so onbar -r -l can restore a continuous chain.
Setup
-
HAC pair:
gbase41(primary, dbhost01),gbase42(standby, dbhost02) - GBase version: 12.10.FC4G1AEE
-
Storage manager: Built‑in GBASE PSM, backup devices at
/home/gbasedbt/bak/DBSPOOLandLOGPOOL
Backup and Failure Simulation
- A level‑0 backup and several logical log backups (27–31) are taken on
gbase41. - The primary is shut down;
gbase42is promoted and generates logs 32 and 33. - Manually transferring those log files and editing the
ixbarfile ongbase41fails because the PSM catalog does not recognize them.
The Right Way: Export and Import PSM Objects
PSM provides onsmsync for moving backups between instances. The tested process follows IBM’s Example 4.
1. Export from the new primary (gbase42)
onpsm -D add /home/gbasedbt/bak/psm_exportdir -g EXTPOOL -t FILE
onsmsync -E -p host02_37 -l 37
This exports all backups (including logs up to 37 and the level‑0 image) into psm_exportdir/host02_37.
2. Copy to the original primary (gbase41)
scp -rp host02_37 dbhost01:/home/gbasedbt/bak/psm_exportdir/
3. On the original primary, prepare the catalog
First add EXTPOOL:
onpsm -D add /home/gbasedbt/bak/psm_exportdir -g EXTPOOL -t FILE
Because the servers have different instance names, delete all existing PSM objects to avoid conflicts:
for i in {1..15}; do onpsm -O del -o $i -y; done
4. Import the catalog
onsmsync -I -p host02_37
This registers all objects from the export, rewrites ixbar.0, and associates them with gbase41.
5. Run the recovery
onbar -r -p # physical restore
onbar -r -l # logical restore – rolls forward from log 34 to 37
The logical restore completed up to log 37 — a fully continuous chain, proving the merge works.
Key Takeaway
-
onbaris a client that feeds data to the storage manager; PSM keeps its own catalog. Directly combining file copies isn’t supported. - Use
onsmsyncexport/import to legally merge backups from two nodes in a gbase database environment. This is the documented IBM method. - For simpler multi‑instance backup merging, consider
ontape(which bypasses PSM) or consult third‑party backup vendors like DingJia.
With this approach, you can maintain a consistent disaster‑recovery story even after role switches in your GBASE high‑availability setups.
Top comments (0)