# Restoring a backup breaks Responsible links

**URL:** <https://help.egroupware.org/t/restoring-a-backup-breaks-responsible-links/73901>\
**Category:** English\
**Created:** [September 23, 2019, 3:08pm UTC](https://help.egroupware.org/t/restoring-a-backup-breaks-responsible-links/73901 "2019-09-23T15:08:40Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![gflower](https://help.egroupware.org/user_avatar/help.egroupware.org/gflower/32/2277_2.png) [@gflower](https://help.egroupware.org/u/gflower)\
**Post date:** [September 23, 2019, 3:08pm UTC](https://help.egroupware.org/t/restoring-a-backup-breaks-responsible-links/73901/1 "2019-09-23T15:08:40Z")

</div>

I just made a fresh installation of Egroupware docker version (19.1) on Ubuntu 18.04.3.  
I restored a backup from another installation and I lost every Delegation - Responsible link in infolog tasks.  
The same happens if I restore a backup on the same machine where the backup was done.  
This make almost useless for me the backup/restore function.  
If you want, I can make tests on my virtualbox installation.

---

<div class="post-metadata">

**Author:** ![RalfBecker](https://help.egroupware.org/user_avatar/help.egroupware.org/ralfbecker/32/1307_2.png) [@RalfBecker](https://help.egroupware.org/u/RalfBecker)\
**Post date:** [September 23, 2019, 3:28pm UTC](https://help.egroupware.org/t/restoring-a-backup-breaks-responsible-links/73901/2 "2019-09-23T15:28:46Z")

</div>

Hmm, we use that functionality nearly daily and I never experienced what you describe!

It almost certainly comes somehow from your environment, of which you told nothing so far.

Ralf

---

<div class="post-metadata">

**Author:** ![gflower](https://help.egroupware.org/user_avatar/help.egroupware.org/gflower/32/2277_2.png) [@gflower](https://help.egroupware.org/u/gflower)\
**Post date:** [September 23, 2019, 3:48pm UTC](https://help.egroupware.org/t/restoring-a-backup-breaks-responsible-links/73901/3 "2019-09-23T15:48:58Z")

</div>

I’ll do more tests tomorow, meanwhile tell me what kind of detail I can provide.

---

<div class="post-metadata">

**Author:** ![RalfBecker](https://help.egroupware.org/user_avatar/help.egroupware.org/ralfbecker/32/1307_2.png) [@RalfBecker](https://help.egroupware.org/u/RalfBecker)\
**Post date:** [September 23, 2019, 4:39pm UTC](https://help.egroupware.org/t/restoring-a-backup-breaks-responsible-links/73901/4 "2019-09-23T16:39:07Z")

</div>

EGroupware version of the backup, where are the accounts stored (SQL, LDAP, AD), …

---

<div class="post-metadata">

**Author:** ![gflower](https://help.egroupware.org/user_avatar/help.egroupware.org/gflower/32/2277_2.png) [@gflower](https://help.egroupware.org/u/gflower)\
**Post date:** [September 24, 2019, 6:46am UTC](https://help.egroupware.org/t/restoring-a-backup-breaks-responsible-links/73901/5 "2019-09-24T06:46:08Z")

</div>

EGroupware version of the backup: 19.1.20190917  
accounts stored: SQL

Today I hope having time to do some tests of backup/restore (I set another machine with Egroupware).

---

<div class="post-metadata">

**Author:** ![gflower](https://help.egroupware.org/user_avatar/help.egroupware.org/gflower/32/2277_2.png) [@gflower](https://help.egroupware.org/u/gflower)\
**Post date:** [September 24, 2019, 7:00am UTC](https://help.egroupware.org/t/restoring-a-backup-breaks-responsible-links/73901/6 "2019-09-24T07:00:53Z")

</div>

I replicate the problem and I send you some screenshots:

1 - I delegated a task:

> **[f6360-clip-94kb.png](https://clip2net.com/s/43JImtY)**
>
> Clip2net — most popular image sharing tool

2 - in infolog view, task appears correcly delegated

> **[09402-clip-52kb.png](https://clip2net.com/s/43JIpMm)**
>
> Clip2net — most popular image sharing tool

3 - I do a backup

> **[aa813-clip-67kb.png](https://clip2net.com/s/43JItlk)**
>
> Clip2net — most popular image sharing tool

4 - then a restore of the backup just done:

> **[f554c-clip-83kb.png](https://clip2net.com/s/43JIwT3)**
>
> Clip2net — most popular image sharing tool

5 - Delegation gone :

> **[059b6-clip-61kb.png](https://clip2net.com/s/43JIAxf)**
>
> Clip2net — most popular image sharing tool

---

<div class="post-metadata">

**Author:** ![RalfBecker](https://help.egroupware.org/user_avatar/help.egroupware.org/ralfbecker/32/1307_2.png) [@RalfBecker](https://help.egroupware.org/u/RalfBecker)\
**Post date:** [September 24, 2019, 7:01am UTC](https://help.egroupware.org/t/restoring-a-backup-breaks-responsible-links/73901/7 "2019-09-24T07:01:35Z")

</div>

Hmm, then I have no idea what can go wrong to get the result you describe.

Thought EGroupware backups are compressed CSV files, so you can easily check if they contain what is in your database: InfoLog delegation is stored in egw\_infolog\_users table.

Ralf

---

<div class="post-metadata">

**Author:** ![RalfBecker](https://help.egroupware.org/user_avatar/help.egroupware.org/ralfbecker/32/1307_2.png) [@RalfBecker](https://help.egroupware.org/u/RalfBecker)\
**Post date:** [September 24, 2019, 8:08am UTC](https://help.egroupware.org/t/restoring-a-backup-breaks-responsible-links/73901/8 "2019-09-24T08:08:34Z")

</div>

Just made a quick test here:

- created a new InfoLog with a delegation to user #213
- did a backup and inspected it with bzless --\> search of egw\_infolog\_users a couple time to reach:

```auto
table: egw_infolog_users
info_res_id,info_id,account_id,info_res_deleted,info_res_modified,info_res_modifier,info_res_status,info_res_attendee
<<< skiped lines >>>
28,1065,"213",NULL,2019-09-24 07:39:42,5,"NEEDS-ACTION",NULL

```

Now restoring it into an other instance:

```auto
mysql egw_test1_dev
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 21663
Server version: 10.3.16-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [egw_test1_dev]> SELECT * FROM egw_infolog_users ORDER BY info_res_id DESC LIMIT 1;
+-------------+---------+------------+------------------+---------------------+-------------------+-----------------+-------------------+
| info_res_id | info_id | account_id | info_res_deleted | info_res_modified | info_res_modifier | info_res_status | info_res_attendee |
+-------------+---------+------------+------------------+---------------------+-------------------+-----------------+-------------------+
| 28 | 1065 | 213 | 0 | 2019-09-24 07:39:42 | 5 | NEEDS-ACTION | NULL |
+-------------+---------+------------+------------------+---------------------+-------------------+-----------------+-------------------+
1 row in set (0.000 sec)

```

So it works here …

Ralf

---

<div class="post-metadata">

**Author:** ![RalfBecker](https://help.egroupware.org/user_avatar/help.egroupware.org/ralfbecker/32/1307_2.png) [@RalfBecker](https://help.egroupware.org/u/RalfBecker)\
**Post date:** [September 24, 2019, 8:20am UTC](https://help.egroupware.org/t/restoring-a-backup-breaks-responsible-links/73901/9 "2019-09-24T08:20:20Z")

</div>

Ok, found the problem 🙂

info\_res\_deleted get restored as 0 not NULL and that causes all delegation to disappear ☹

I’ll fix it in the software, though you can easily fixed for yourself right now:

```auto
UPDATE egw_infolog_users SET info_res_deleted=NULL WHERE info_res_deleted=0

```

Ralf

---

<div class="post-metadata">

**Author:** ![gflower](https://help.egroupware.org/user_avatar/help.egroupware.org/gflower/32/2277_2.png) [@gflower](https://help.egroupware.org/u/gflower)\
**Post date:** [September 24, 2019, 8:37am UTC](https://help.egroupware.org/t/restoring-a-backup-breaks-responsible-links/73901/10 "2019-09-24T08:37:20Z")

</div>

Great, thx 🙂

---

<div class="post-metadata">

**Author:** ![RalfBecker](https://help.egroupware.org/user_avatar/help.egroupware.org/ralfbecker/32/1307_2.png) [@RalfBecker](https://help.egroupware.org/u/RalfBecker)\
**Post date:** [September 24, 2019, 12:26pm UTC](https://help.egroupware.org/t/restoring-a-backup-breaks-responsible-links/73901/11 "2019-09-24T12:26:32Z")

</div>

The restore is fixed not and there is an update fixing already broken / lost delegation entries:

> <https://github.com/EGroupware/egroupware/commit/0f24d0187cedfc457299ec689e94b10bec50997a>

Please mark the topic as fixed.

Ralf

---

<div class="post-metadata">

**Author:** ![gflower](https://help.egroupware.org/user_avatar/help.egroupware.org/gflower/32/2277_2.png) [@gflower](https://help.egroupware.org/u/gflower)\
**Post date:** [September 24, 2019, 10:19pm UTC](https://help.egroupware.org/t/restoring-a-backup-breaks-responsible-links/73901/12 "2019-09-24T22:19:03Z")

</div>

Done.  
I’m a newbie about docker, how can I apply this fix? :  
Sorry for the dumb question!

---

<div class="post-metadata">

**Author:** ![RalfBecker](https://help.egroupware.org/user_avatar/help.egroupware.org/ralfbecker/32/1307_2.png) [@RalfBecker](https://help.egroupware.org/u/RalfBecker)\
**Post date:** [September 25, 2019, 7:19am UTC](https://help.egroupware.org/t/restoring-a-backup-breaks-responsible-links/73901/13 "2019-09-25T07:19:00Z")

</div>

Most easy is to wait for the next maintenance release, which we plan for the next days.

You can of cause apply a patch, eg. from a GitHub commit, to the container.  
To get a patch from a GitHub commit you append `.patch` to it’s URL, eg. for the one I posted in this thread: [https://github.com/EGroupware/egroupware/commit/0f24d0187cedfc457299ec689e94b10bec50997a.patch](https://github.com/EGroupware/egroupware/commit/0f24d0187cedfc457299ec689e94b10bec50997a.patch)

Then you need to run the following commands:

```auto
export patch=https://github.com/EGroupware/egroupware/commit/0f24d0187cedfc457299ec689e94b10bec50997a.patch
curl $patch | docker exec -i egroupware patch -p1 -d /usr/share/egroupware-sources
cd /etc/egroupware-docker
docker-compose restart

```

> One word of caution: not every commit can be applied to the last release, as there might be other commits to the same file(s) between the release and the one you want to apply.

**Worst case it applies only partially and you end up with something not working at all!**  
This case is easy to fix with Docker:

```auto
cd /etc/egroupware-docker
docker-compose stop
docker-compose rm -f egroupware
docker-compose up -d

```

This simply throws the modifications to the egroupware image away by deleting the container and re-creating it.

Ralf

---

<div class="post-metadata">

**Author:** ![gflower](https://help.egroupware.org/user_avatar/help.egroupware.org/gflower/32/2277_2.png) [@gflower](https://help.egroupware.org/u/gflower)\
**Post date:** [September 25, 2019, 7:24am UTC](https://help.egroupware.org/t/restoring-a-backup-breaks-responsible-links/73901/14 "2019-09-25T07:24:06Z")

</div>

Thanks for your fast and patient support 😃  
And compliments for your wonderful software.

---

<div class="post-metadata">

**Author:** ![RalfBecker](https://help.egroupware.org/user_avatar/help.egroupware.org/ralfbecker/32/1307_2.png) [@RalfBecker](https://help.egroupware.org/u/RalfBecker)\
**Post date:** [September 25, 2019, 7:57am UTC](https://help.egroupware.org/t/restoring-a-backup-breaks-responsible-links/73901/15 "2019-09-25T07:57:08Z")

</div>

> [@](#):
>
> And compliments for your wonderful software.

You are welcome 🙂

---

<div class="post-metadata">

**Author:** ![gflower](https://help.egroupware.org/user_avatar/help.egroupware.org/gflower/32/2277_2.png) [@gflower](https://help.egroupware.org/u/gflower)\
**Post date:** [October 30, 2019, 11:29am UTC](https://help.egroupware.org/t/restoring-a-backup-breaks-responsible-links/73901/16 "2019-10-30T11:29:43Z")

</div>

@RalfBecker, I tried to apply the patch as you wrote, but at second command:

```
    curl $patch | docker exec -it egroupware patch -p1 -d /usr/share/egroupware-sources
  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
  0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.39/containers/egroupware/json: dial unix /var/run/docker.sock: connect: permission denied
100 2589 0 2589 0 0 4162 0 --:--:-- --:--:-- --:--:-- 4162
(23) Failed writing body

```

Also with sudo.

---

<div class="post-metadata">

**Author:** ![RalfBecker](https://help.egroupware.org/user_avatar/help.egroupware.org/ralfbecker/32/1307_2.png) [@RalfBecker](https://help.egroupware.org/u/RalfBecker)\
**Post date:** [October 30, 2019, 12:37pm UTC](https://help.egroupware.org/t/restoring-a-backup-breaks-responsible-links/73901/17 "2019-10-30T12:37:06Z")

</div>

> [@](#):
>
> Also with sudo.

Was probably in the wrong place 😉

Do a `sudo su -` and run it then.

Ralf

---

<div class="post-metadata">

**Author:** ![gflower](https://help.egroupware.org/user_avatar/help.egroupware.org/gflower/32/2277_2.png) [@gflower](https://help.egroupware.org/u/gflower)\
**Post date:** [October 30, 2019, 1:02pm UTC](https://help.egroupware.org/t/restoring-a-backup-breaks-responsible-links/73901/18 "2019-10-30T13:02:21Z")

</div>

> [@](#):
>
> curl $patch | docker exec -it egroupware patch -p1 -d /usr/share/egroupware-sources

```
root@osboxes:~# curl $patch | docker exec -it egroupware patch -p1 -d /usr/share/egroupware-sources
  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
  0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0WARNING: Error loading config file: /root/.docker/config.json: read /root/.docker/config.json: is a directory
the input device is not a TTY
100 2589 0 2589 0 0 2736 0 --:--:-- --:--:-- --:--:-- 2733
(23) Failed writing body
```

---

<div class="post-metadata">

**Author:** ![RalfBecker](https://help.egroupware.org/user_avatar/help.egroupware.org/ralfbecker/32/1307_2.png) [@RalfBecker](https://help.egroupware.org/u/RalfBecker)\
**Post date:** [October 30, 2019, 1:18pm UTC](https://help.egroupware.org/t/restoring-a-backup-breaks-responsible-links/73901/19 "2019-10-30T13:18:06Z")

</div>

> [@](#):
>
> curl $patch | docker exec -it egroupware patch -p1 -d /usr/share/egroupware-sources

Problem is the -t on the command line, that is now allowed, if you pipe content into it, so try again with just

```auto
curl $patch | docker exec -i egroupware patch -p1 -d /usr/share/egroupware-sources

```

I’ll change it in the original article too now.

Ralf

---

<div class="post-metadata">

**Author:** ![gflower](https://help.egroupware.org/user_avatar/help.egroupware.org/gflower/32/2277_2.png) [@gflower](https://help.egroupware.org/u/gflower)\
**Post date:** [October 30, 2019, 1:39pm UTC](https://help.egroupware.org/t/restoring-a-backup-breaks-responsible-links/73901/20 "2019-10-30T13:39:21Z")

</div>

perfect, it works. Thanks, as usual.
