Ontape restore with differenct Db Chunk spaces
Posted in 2025
Mark Clayton wanted to restore an ontape level 0 backup from live onto a test system whose chunk names differed (version 12.10). Mike Walker pointed to ontape -r -rename -f with a mapping file; Paul Watson and Art Kagel also suggested symbolic links. Solved: Mark created empty chunk files matching the source names on the target and the ontape restore worked.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Topics: Backup & Restore, Storage & Space Management, Server Administration
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
------------------------------
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
------------------------------
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 ------------------------------
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 ------------------------------
Hi, It would help to know the version of the Informix the backup was done with. Wayne Martin
Use the rename option under ontape either via command line or file
originalpath offset targetpath offset
or just create the appropriate links
ln -s targetpath originalpath
Cheers
Paul
On 8/11/2025 10:23 PM, Mark Clayton via IBM TechXchange Community wrote:
010001989c4e35e4-6fa339f8-b3aa-46b7-b76e-a81c15fbb861-000000@email.amazonses.com">
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... -posted to the "Informix" group
Mark: First, Mike's recommendation is the preferred fix for your problem. Next, the alternative, old school, solution, just for completeness and if anyone reading the thread has an older version of Informix that does not support redirected restores (ie the rename option) , you can create symbolic links at the original paths that point to the actual paths on the target restore system. This might be the answer to your question about a " 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". However, I'm not sure what you are asking here. A restore completely overwrites whatever was in the chunk files/devices, if anything, when you restore. You could just touch empty files with the original chunk paths if you have the space on those filesystems and do the restore that way, Is that what you are asking? Art Art S. Kagel, President and Principal Consultant ASK Database Management www.askdbmgt.com Blog: http://informix-myview.blogspot.com/ Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves.
Hi Mike, thanks for further advice. We'll go down that path - we can do some tests and make sure we got it right. Cheers mark ------------------------------ Mark Clayton ------------------------------
Hi Art, thanks for the reply and advise too. We're on 12.10 so not too old. We'll review as per Mike suggestion above. I guess we want to keep the process simple and simple for the future as well. Appreciate the reply. Cheers mark ------------------------------ Mark Clayton ------------------------------
Hi Wayne, 12.10. Thanks for the reply. as noted above we'll try and align via Mike's suggestion. Cheers. mark ------------------------------ Mark Clayton ------------------------------
Hi Paul, thanks too for the reply and advice. Appreciate that. Cheers, mark ------------------------------ Mark Clayton ------------------------------
Hi Mike et al. just some feedback for you on this topic. We finally got around to doing a Live to Test restore. on the target system we created some Db chunk touch files to match the source system file names - ontape restore worked beautifully and target system now matches live - balance has been restored to the universe of Db chunks! Appreciate the advice, as always.
Cheers
Mark
------------------------------
Mark Clayton
------------------------------