I cannot restore a backup. In the logs I have the error Dataset BCK001, file /home/fazenda/backup219.29112019 could not be opened. Could someone help me with this problem?
You accepted the license agreement
02/06/23-16:02:08: Initialize environment
%ADAINS-I-CRFISUC, file /data/etc/ADABAS.INI created successfully.
02/06/23-16:02:08: Start Docker container for Adabas
SHOWIPC for ADABAS 7.1.1.0 (Linux 64Bit)
%ADASET-W-INVDBID, database 001 not known on node cd72c66b3abc
02/06/23-16:02:09: Create Adabas demo database
Going to create database with ID 1.
Database with ID 1 successfully created.
02/06/23-16:02:17: Restore backup=/home/fazenda/backup219.29112019 an files *
2023-02-06 16:02:17 %ADABCK-I-STARTED, 06-FEB-2023 16:02:17, Version 7.1.1.0 (Linux 64Bit)
2023-02-06 16:02:17 %ADABCK-I-DBOFF, database 1 accessed offline
2023-02-06 16:02:18 %ADABCK-F-OPNERR, Dataset BCK001, file /home/fazenda/backup219.29112019 could not be opened
2023-02-06 16:02:18 %ADABCK-E-ERRNOM, errno (2): No such file or directory
2023-02-06 16:02:18 %ADABCK-I-IOCNT, 2 IOs on dataset ASSO
2023-02-06 16:02:18 %ADABCK-I-ABORTED, 06-FEB-2023 16:02:18, elapsed time: 00:00:01
02/06/23-16:02:18: Restore of Adabas database backup fails
what command did you enter (please include all parameters used)?
What is the value of the BCK001 environment variable?
What database do you expect to your restore to go to - it looks like you didn’t specify a target database, so it is assuming dbid=1, which didn’t exist?
I don’t know the value of the BCK001 variable. In fact, I didn’t know adabas until I needed to restore this backup. It will be created on a solaris 9 server and I am trying to restore this backup using an adabas docker container.
Do I need to create a new database to receive the backup?
I don’t have much experience with the latest ADABAS CE, but I think you need --mount to tell Docker where your backup file is located within the filesystem.
I think the problem is that the backup file can not be found inside your docker container (already mentioned by @Ralph_Zbrog). I guess /home/fazenda/backup219.29112019 is a path on your host machine and not inside your docker container.
So I think you need to mount (-v /home/fazenda:/backups) the directory containing your backup file in your docker container and reference the backup file path from there (/backups/backup219.29112019):
If the database ID of your backup is not 1 but 123, then should also add -e ADADBID=123 to the docker command above otherwise you might see an error message in the docker output indicating the required database ID: %ADABCK-E-DBIDMM, DBID mismatch: present XXX.
I ran the command docker run -e ACCEPT_EULA=Y -e ADADBID=123 -e ADA_RESTORE_BCK=/backups/backup219.29112019 -v /home/fazenda:/backups --name adabas-db softwareag/adabas-ce:7.1.1 gave the following message
You accepted the license agreement
02/15/23-21:15:39: Initialize environment
%ADAINS-I-CRFISUC, file /data/etc/ADABAS.INI created successfully.
02/15/23-21:15:39: Start Docker container for Adabas
SHOWIPC for ADABAS 7.1.1.0 (Linux 64Bit)
%ADASET-W-INVDBID, database 123 not known on node 56440fc8c6da
02/15/23-21:15:39: Create Adabas demo database
Going to create database with ID 123.
Database with ID 123 successfully created.
02/15/23-21:15:47: Restore backup=/backups/backup219.29112019 an files *
2023-02-15 21:15:47 %ADABCK-I-STARTED, 15-FEB-2023 21:15:47, Version 7.1.1.0 (Linux 64Bit)
2023-02-15 21:15:47 %ADABCK-I-DBOFF, database 123 accessed offline
2023-02-15 21:15:47 %ADABCK-F-OPNERR, Dataset BCK001, file /backups/backup219.29112019 could not be opened
2023-02-15 21:15:47 %ADABCK-E-ERRNOM, errno (13): Permission denied
2023-02-15 21:15:47 %ADABCK-I-IOCNT, 2 IOs on dataset ASSO
2023-02-15 21:15:47 %ADABCK-I-ABORTED, 15-FEB-2023 21:15:47, elapsed time: 00:00:00
02/15/23-21:15:47: Restore of Adabas database backup fails
What permissions has the file /home/fazenda/backup219.29112019?
ls -l /home/fazenda/backup219.29112019
The user running Adabas utilities within the docker container needs permission to read your backup file.
A quick solution might be to grant read access for ‘others’ running