Hi Mike, thanks for further advice. We'll go down that path - we can do some tests and make sure we got it right.
Original Message:
Sent: Tue August 12, 2025 04:12 AM
From: Mike Walker
Subject: Ontape restore with differenct Db Chunk spaces
Not automatically. Assuming that you are using cooked files, you can just manually create empty files on your target that match the source system and the run the restore. You don't need to actually add chunks to the target, just having the empty files there with the appropriate permissions and ownership is sufficient. You will need to delete the old chunks to reclaim the space. You can use symbolic links to point to your old chunks if you want to but that might be overcomplicating things. Just remember that, unless you use a mapping file, all of the files listed on the source system as chunks must exist on the target system or the restore will fail.
------------------------------
Mike Walker
xDB Systems, Inc
www.xdbsystems.com
Original Message:
Sent: Tue August 12, 2025 12:07 AM
From: Mark Clayton
Subject: Ontape restore with differenct Db Chunk spaces
Hi Mike, thanks for the quick reply. (we had a friendly bet running with my team that the community would answer our informix quicker than another [unnamed] party!)
We'll review that option. I take it the rename method aligns the import file chunk structure to be the same as the target system? Is there way to re-align the target system chunk names to match that of the source (i.e. "destroy" the old chunks in the target, create new chunks then run the level0 restore)?
Many thanks!
mark
------------------------------
Mark Clayton
Original Message:
Sent: Mon August 11, 2025 11:39 PM
From: Mike Walker
Subject: Ontape restore with differenct Db Chunk spaces
Hi Mark,
This is very achievable. Take a look at the "rename" option when you run the ontape. You can specify a mapping file to map the filenames of the chunks from the source system (prod) to the names of the chunks on the target system (test).
The format of the file is:
source-chunk source-offset target-chunk target-offset
With the restore, run: ontape -r -rename -f <mapping_file>
Rename chunks during a restore - IBM Documentation
------------------------------
Mike Walker
xDB Systems, Inc
www.xdbsystems.com
Original Message:
Sent: Mon August 11, 2025 11:23 PM
From: Mark Clayton
Subject: Ontape restore with differenct Db Chunk spaces
Hi all, hopefully this is an easy one for you all, but getting a straight answer at our end is eluding us.
Periodically, we do a Live to Test restore of a level 0 backup. We are using ontape for the backup and restore.
We've recently had a situation where the DB chunk names and spaces are different between Live and one of our test systems.
- can we use an ontape restore to restore where there are different Db chunks on the target system?
- if so, what is the right procedure / process / commands?
- if not, what would be the best approach to resolve and align the chunks on the target system (e.g. at time of next restore)
note that we've done restores successfully many times in the past, but the DB Chunks have always been in alignment.
below are the errors we received the last time we tried this with the different Db chunk names:
- Cannot open Chunk: '/data/dbs/erp/erpdata/erp_erpdata_8.dbs'
- Cannot Open Primary Chunk '/data/dbs/erp/erpdata/erp_erpdata_8.dbs', errno = 2
below are the commands we usually use for the restore
- onmode –k
- ontape –r
- onmode –m
Any help or guidance appreciated.
ps. we think the answer is option 3, above...
Many thanks!
mark
------------------------------
Mark Clayton
------------------------------