13 / 20
Sep 2019

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.

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

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

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

I replicate the problem and I send you some screenshots:

1 - I delegated a task:

2 - in infolog view, task appears correcly delegated

3 - I do a backup

4 - then a restore of the backup just done:

5 - Delegation gone :

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

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

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

Ok, found the problem :slight_smile:

info_res_deleted get restored as 0 not NULL and that causes all delegation to disappear :frowning:

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

UPDATE egw_infolog_users SET info_res_deleted=NULL WHERE info_res_deleted=0

Ralf

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

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.patch1

Then you need to run the following commands:

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:

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

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

1 month later

@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.

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

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

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

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

Ralf