# I cannot restore a backup

**URL:** <https://techcommunity.softwareag.com/t/i-cannot-restore-a-backup/268913>\
**Category:** Forum\
**Tags:** Adabas-Natural, Adabas, Adabas-on-Mainframes, Adabas-on-Linux\
**Created:** [February 6, 2023, 8:13pm UTC](https://techcommunity.softwareag.com/t/i-cannot-restore-a-backup/268913 "2023-02-06T20:13:14Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ls1000](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/ls1000/32/25734_2.png) [@ls1000](https://techcommunity.softwareag.com/u/ls1000)\
**Post date:** [February 6, 2023, 8:13pm UTC](https://techcommunity.softwareag.com/t/i-cannot-restore-a-backup/268913/1 "2023-02-06T20:13:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Douglas\_Kelly](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/douglas_kelly/32/102_2.png) [@Douglas\_Kelly](https://techcommunity.softwareag.com/u/Douglas_Kelly)\
**Post date:** [February 6, 2023, 8:30pm UTC](https://techcommunity.softwareag.com/t/i-cannot-restore-a-backup/268913/2 "2023-02-06T20:30:41Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Leon\_Matthee](https://avatars.discourse-cdn.com/v4/letter/l/ebca7d/32.png) [@Leon\_Matthee](https://techcommunity.softwareag.com/u/Leon_Matthee)\
**Post date:** [February 7, 2023, 4:47am UTC](https://techcommunity.softwareag.com/t/i-cannot-restore-a-backup/268913/3 "2023-02-07T04:47:32Z")

</div>

Try the following command:

cd /home/fazenda/

export BCK001= backup219.29112019

adabck db=1 restore=\*

![image002.jpg](https://global.discourse-cdn.com/techcommunity/original/3X/f/0/f003192a1f3cbff81737c51a6c1ed5f5dd97394e.jpeg)

![image001_cccd2bf4-c3e0-4c96-b556-98cf81244cdf.png](https://global.discourse-cdn.com/techcommunity/original/3X/5/0/509a90cc495f3aec29350a03e69acd12f6691690.png)

![image004_138bdf32-6aba-4681-ad4f-53daa86ec9e9.png](https://global.discourse-cdn.com/techcommunity/original/3X/0/5/055bb48730c841db1f3c1c71782b687d7d671e89.png)

![image005_23761c5f-d053-49df-925a-4e1797e33662.png](https://global.discourse-cdn.com/techcommunity/original/3X/9/e/9e6d714844f1180c17a6005305ff9a9534db30f5.png)

![image006_856dd121-bc28-4c4f-9ffe-0137aa2ba9e1.png](https://global.discourse-cdn.com/techcommunity/original/3X/c/e/ce7613397dd4797b77d90d386fae0ce2cffe503f.png)

![image002_e53bb60d-f059-4fa4-a953-c4665e2c6914.png](https://global.discourse-cdn.com/techcommunity/original/3X/7/7/77af9a7b628c387aa451910d5c20a40292f5fc98.png)

 ![Capture_377c4630-4141-4319-a835-126b0a0080bd.JPG](https://global.discourse-cdn.com/techcommunity/original/3X/b/d/bd1b70057e641b059e36b0ad5f759bb5f5e872a4.jpeg)

![image018_5be77e41-1272-444f-9c7d-e42a7e25e9d7.png](https://global.discourse-cdn.com/techcommunity/original/3X/5/0/50844bc3b7cebc3bcfc11371d06db965526fa980.png)

---

<div class="post-metadata">

**Author:** ![Douglas\_Kelly](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/douglas_kelly/32/102_2.png) [@Douglas\_Kelly](https://techcommunity.softwareag.com/u/Douglas_Kelly)\
**Post date:** [February 7, 2023, 6:40am UTC](https://techcommunity.softwareag.com/t/i-cannot-restore-a-backup/268913/4 "2023-02-07T06:40:23Z")

</div>

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

> [@ls1000](#):
>
> /home/fazenda/backup219.29112019 could not be opened  
> 2023-02-06 16:02:18 %ADABCK-E-ERRNOM, errno (2): No such file or directory

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

---

<div class="post-metadata">

**Author:** ![Mario\_Fonseca\_Junior](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/mario_fonseca_junior/32/23386_2.png) [@Mario\_Fonseca\_Junior](https://techcommunity.softwareag.com/u/Mario_Fonseca_Junior)\
**Post date:** [February 7, 2023, 1:07pm UTC](https://techcommunity.softwareag.com/t/i-cannot-restore-a-backup/268913/5 "2023-02-07T13:07:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ls1000](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/ls1000/32/25734_2.png) [@ls1000](https://techcommunity.softwareag.com/u/ls1000)\
**Post date:** [February 7, 2023, 3:13pm UTC](https://techcommunity.softwareag.com/t/i-cannot-restore-a-backup/268913/6 "2023-02-07T15:13:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ls1000](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/ls1000/32/25734_2.png) [@ls1000](https://techcommunity.softwareag.com/u/ls1000)\
**Post date:** [February 7, 2023, 3:22pm UTC](https://techcommunity.softwareag.com/t/i-cannot-restore-a-backup/268913/7 "2023-02-07T15:22:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ls1000](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/ls1000/32/25734_2.png) [@ls1000](https://techcommunity.softwareag.com/u/ls1000)\
**Post date:** [February 8, 2023, 4:16pm UTC](https://techcommunity.softwareag.com/t/i-cannot-restore-a-backup/268913/8 "2023-02-08T16:16:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Ralph\_Zbrog](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/ralph_zbrog/32/78_2.png) [@Ralph\_Zbrog](https://techcommunity.softwareag.com/u/Ralph_Zbrog)\
**Post date:** [February 8, 2023, 10:23pm UTC](https://techcommunity.softwareag.com/t/i-cannot-restore-a-backup/268913/9 "2023-02-08T22:23:19Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Sven\_Born](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/sven_born/32/39756_2.png) [@Sven\_Born](https://techcommunity.softwareag.com/u/Sven_Born)\
**Post date:** [February 9, 2023, 8:59am UTC](https://techcommunity.softwareag.com/t/i-cannot-restore-a-backup/268913/10 "2023-02-09T08:59:04Z")

</div>

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

```auto
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`.

---

<div class="post-metadata">

**Author:** ![ls1000](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/ls1000/32/25734_2.png) [@ls1000](https://techcommunity.softwareag.com/u/ls1000)\
**Post date:** [February 15, 2023, 9:20pm UTC](https://techcommunity.softwareag.com/t/i-cannot-restore-a-backup/268913/11 "2023-02-15T21:20:04Z")

</div>

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

```auto
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

---

<div class="post-metadata">

**Author:** ![Ralph\_Zbrog](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/ralph_zbrog/32/78_2.png) [@Ralph\_Zbrog](https://techcommunity.softwareag.com/u/Ralph_Zbrog)\
**Post date:** [February 15, 2023, 10:00pm UTC](https://techcommunity.softwareag.com/t/i-cannot-restore-a-backup/268913/12 "2023-02-15T22:00:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Sven\_Born](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/sven_born/32/39756_2.png) [@Sven\_Born](https://techcommunity.softwareag.com/u/Sven_Born)\
**Post date:** [February 16, 2023, 7:53am UTC](https://techcommunity.softwareag.com/t/i-cannot-restore-a-backup/268913/13 "2023-02-16T07:53:28Z")

</div>

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`

---

<div class="post-metadata">

**Author:** ![ls1000](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/ls1000/32/25734_2.png) [@ls1000](https://techcommunity.softwareag.com/u/ls1000)\
**Post date:** [February 16, 2023, 7:47pm UTC](https://techcommunity.softwareag.com/t/i-cannot-restore-a-backup/268913/14 "2023-02-16T19:47:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Douglas\_Kelly](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/douglas_kelly/32/102_2.png) [@Douglas\_Kelly](https://techcommunity.softwareag.com/u/Douglas_Kelly)\
**Post date:** [February 16, 2023, 8:18pm UTC](https://techcommunity.softwareag.com/t/i-cannot-restore-a-backup/268913/15 "2023-02-16T20:18:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ls1000](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/ls1000/32/25734_2.png) [@ls1000](https://techcommunity.softwareag.com/u/ls1000)\
**Post date:** [February 16, 2023, 8:32pm UTC](https://techcommunity.softwareag.com/t/i-cannot-restore-a-backup/268913/16 "2023-02-16T20:32:14Z")

</div>

yes, I use the root user

---

<div class="post-metadata">

**Author:** ![Sven\_Born](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/sven_born/32/39756_2.png) [@Sven\_Born](https://techcommunity.softwareag.com/u/Sven_Born)\
**Post date:** [February 16, 2023, 10:11pm UTC](https://techcommunity.softwareag.com/t/i-cannot-restore-a-backup/268913/17 "2023-02-16T22:11:14Z")

</div>

What permission has your user’s home folder?

`ls -l /home/ | grep fazenda`

---

<div class="post-metadata">

**Author:** ![Sven\_Born](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/sven_born/32/39756_2.png) [@Sven\_Born](https://techcommunity.softwareag.com/u/Sven_Born)\
**Post date:** [February 16, 2023, 10:13pm UTC](https://techcommunity.softwareag.com/t/i-cannot-restore-a-backup/268913/18 "2023-02-16T22:13:15Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ls1000](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/ls1000/32/25734_2.png) [@ls1000](https://techcommunity.softwareag.com/u/ls1000)\
**Post date:** [February 24, 2023, 1:02pm UTC](https://techcommunity.softwareag.com/t/i-cannot-restore-a-backup/268913/19 "2023-02-24T13:02:38Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ls1000](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/ls1000/32/25734_2.png) [@ls1000](https://techcommunity.softwareag.com/u/ls1000)\
**Post date:** [February 27, 2023, 1:55pm UTC](https://techcommunity.softwareag.com/t/i-cannot-restore-a-backup/268913/20 "2023-02-27T13:55:03Z")

</div>

o que eu faço agora?

[Next page](https://techcommunity.softwareag.com/t/i-cannot-restore-a-backup/268913.md?page=2)
