I cannot restore a backup

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?

Try the following command:

cd /home/fazenda/

export BCK001= backup219.29112019

adabck db=1 restore=*

image002.jpg

image001_cccd2bf4-c3e0-4c96-b556-98cf81244cdf.png

image004_138bdf32-6aba-4681-ad4f-53daa86ec9e9.png

image005_23761c5f-d053-49df-925a-4e1797e33662.png

image006_856dd121-bc28-4c4f-9ffe-0137aa2ba9e1.png

image002_e53bb60d-f059-4fa4-a953-c4665e2c6914.png

image018_5be77e41-1272-444f-9c7d-e42a7e25e9d7.png

is there a valid Adabas backup at the BCK001 location specified?

Apparently adabck is not finding a file it can open at that address or perhaps it is not an Adabas backup file.

TRY
$ chmod +rw /home/fazenda/backup219.29112019

$ adaopr db=1 lock=0

$export BCK001=/home/fazenda/backup219.29112019

$ adabck db=1 overlay=(1-9999),fmove

$adaopr db=1 unlock=0

I used this command:

docker run -d -p 60001:60001 -p 8190:8190 -e ACCEPT_EULA=Y -e ADA_RESTORE_BCK=/home/fazenda/backup219.29112019 --name adabas-db softwareag/adabas-ce:7.1.1

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?

dbid=1 does not exist.

this is the backup file:

drwxr-xr-x 3 root root 4096 out 18 18:58 …
-rwxrwxrwx 1 fazenda fazenda 466747904 fev 3 13:48 backup219.29112019

displayed the following error when running the command adabck db=1 overlay=1-9999,fmove

2023-02-08 16:12:59 %ADABCK-I-STARTED, 08-FEB-2023 16:12:59, Version 7.1.1.0 (Linux 64Bit)
2023-02-08 16:12:59 %ADABCK-I-DBON, database 1 accessed online
2023-02-08 16:12:59 %ADABCK-F-OPNERR, Dataset BCK001, file backup219.29112019 could not be opened
2023-02-08 16:12:59 %ADABCK-F-ILLLOG, illegal log number detected, present 1, expected 256
2023-02-08 16:12:59 %ADABCK-I-IOCNT, 1 IOs on dataset ASSO
2023-02-08 16:12:59 %ADABCK-I-IOCNT, 0 IOs on dataset BCK001
2023-02-08 16:12:59 %ADABCK-I-ABORTED, 08-FEB-2023 16:12:59, elapsed time: 00:00:00

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):

docker run -e ACCEPT_EULA=Y -e ADA_RESTORE_BCK=/backups/backup219.29112019 -v /home/fazenda:/backups --name adabas-db softwareag/adabas-ce:7.1.1

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

sorry for the delay in feedback

Excellent. You went from “”%ADABCK-E-ERRNOM, errno (2): No such file or directory" to “%ADABCK-E-ERRNOM, errno (13): Permission denied”.

Looks like there still is a permissions issue.

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

chmod o+r /home/fazenda/backup219.29112019

this is the permissions of backup file:

drwxr-xr-x 3 root root 4096 out 18 18:58 …
-rwxrwxrwx 1 fazenda fazenda 466747904 fev 3 13:48 backup219.29112019

does the account running the docker container have access to the folder /home/fazenda?

yes, I use the root user

What permission has your user’s home folder?

ls -l /home/ | grep fazenda

You can try the following.

Running a ‘usual’ configuration without backup file should work:

docker run -e ACCEPT_EULA=Y -e ADADBID=123 -e ADA_DB_CREATION=demodb -v /home/fazenda:/backups --name adabas-db softwareag/adabas-ce:7.1.1

When the container has started successfully you can run the following command in a separate host shell to start a shell within the docker container:

docker exec -it adabas-db bash

In this docker shell list the content of ‘/backups’:

ls -al /backups/

Does this work?

it worked! But instead of creating the volume for /home/farm I created it for /home/farm/backups

o que eu faço agora?