Relationship Graph

Relationship Graph
related to related to child of child of duplicate of duplicate of

View Issue Details

IDProjectCategoryView StatusLast Update
0004390SOGosogo-toolpublic2018-04-27 16:36
ReporterASolana Assigned Tofrancis  
PriorityimmediateSeveritymajorReproducibilityalways
Status closedResolutionfixed 
OSUbuntuOS Version16.04  
Product Version3.2.10 
Summary0004390: Sogo-tool deletes sogo_acl table when it restores folders from a user backup
Description

I have a Sogo 3.2.10 running on Ubuntu 16.04 server using a MYSQL sogo database

sogo-tool deletes sogo_acl table when it's restoring folders from a user backup file generated with sogo-tool.

Executed command: "sogo-tool -f ALL folder user"

I followed steps explained in page https://sogo.nu/support/faq/how-can-i-backuprestore-my-user-data.html

Steps To Reproduce
  1. Activate Mysql debug in /etc/sogo/sogo.conf adding this line:
    "MySQL4DebugEnabled = YES;"

then restart sogo service:

service sogo restart

  1. Create a user backup file with sogo-tool

sogo-tool -f ALL folder user

  1. Create a Mysql sogo_acl table backup
    mysqldump sogo sogo_acl > 1.sogo.sogo_acl.sql

  2. Remove user
    sogo-tool remove user

  3. Restore user folders:
    sogo-tool restore -f ALL folder user > user.folder.restore.log 2>&1

At this point all sogo_acl table contents are deleted.

user.folder.restore.log file contents shows how sogo-tool executes an "UPDATE" and a "DELETE FROM sogo_acl;" commands for every object folder in "user" backup file.

"DELETE FROM sogo_acl" command it has no sense, it deletes everything.

  1. Create a Mysql sogo_acl table backup post restore:
    mysqldump sogo sogo_acl > 2.sogo.sogo_acl.sql

You can see 2.sogo.sogo_acl.sql file is empty.

Additional Information

Execute this command:

cat sogo-tool.user.folder.restore.log | egrep "UPDATE|DELETE"

in order to see how "DELETE FROM sogo_acl;" is executed for each of 6 folders in the "usuari.elena2" backup file:

$ cat sogo-tool.user.folder.restore.log | egrep "UPDATE|DELETE"
2018-02-05 17:52:09.858 sogo-tool[37559] <MySQL4Channel[0x0x2726f40] connection=0x0x26e24f0> SQL: UPDATE sogo_folder_info SET c_foldername = 'Calendari personal' WHERE c_path = '/Users/usuari.elena2/Calendar/personal';
2018-02-05 17:52:09.861 sogo-tool[37559] <MySQL4Channel[0x0x2726f40] connection=0x0x26e24f0> SQL: DELETE FROM sogo_acl;
2018-02-05 17:52:10.030 sogo-tool[37559] <MySQL4Channel[0x0x2726f40] connection=0x0x26e24f0> SQL: UPDATE sogo_folder_info SET c_foldername = 'Llibreta d''adreces de usuari.elena2' WHERE c_path = '/Users/usuari.elena2/Contacts/CB76-5A761500-1-56127A00';
2018-02-05 17:52:10.034 sogo-tool[37559] <MySQL4Channel[0x0x2726f40] connection=0x0x26e24f0> SQL: DELETE FROM sogo_acl;
2018-02-05 17:52:10.056 sogo-tool[37559] <MySQL4Channel[0x0x2726f40] connection=0x0x26e24f0> SQL: UPDATE sogo_folder_info SET c_foldername = 'Agenda de usuari.elena2' WHERE c_path = '/Users/usuari.elena2/Calendar/CC1E-5A761580-1-452BAD80';
2018-02-05 17:52:10.059 sogo-tool[37559] <MySQL4Channel[0x0x27ff6a0] connection=0x0x2a6abe0> SQL: DELETE FROM sogo_acl;
2018-02-05 17:52:10.179 sogo-tool[37559] <MySQL4Channel[0x0x27ff6a0] connection=0x0x2a6abe0> SQL: UPDATE sogo_folder_info SET c_foldername = 'Copia ASF' WHERE c_path = '/Users/usuari.elena2/Contacts/CB99-5A761500-1-5B8A7700';
2018-02-05 17:52:10.183 sogo-tool[37559] <MySQL4Channel[0x0x2726f40] connection=0x0x26e24f0> SQL: DELETE FROM sogo_acl;
2018-02-05 17:52:16.634 sogo-tool[37559] <MySQL4Channel[0x0x27ff6a0] connection=0x0x2a6abe0> SQL: UPDATE sogo_folder_info SET c_foldername = 'Personal Address Book' WHERE c_path = '/Users/usuari.elena2/Contacts/personal';
2018-02-05 17:52:16.639 sogo-tool[37559] <MySQL4Channel[0x0x2726f40] connection=0x0x26e24f0> SQL: DELETE FROM sogo_acl;
2018-02-05 17:52:16.650 sogo-tool[37559] <MySQL4Channel[0x0x27ff6a0] connection=0x0x2a6abe0> SQL: UPDATE sogo_folder_info SET c_foldername = '2on. calendari usuari.elena2' WHERE c_path = '/Users/usuari.elena2/Calendar/CC3F-5A761580-1-6EE7C600';
2018-02-05 17:52:16.654 sogo-tool[37559] <MySQL4Channel[0x0x2726f40] connection=0x0x26e24f0> SQL: DELETE FROM sogo_acl;

TagsNo tags attached.

Relationships

duplicate of 0004385 resolvedfrancis Sogo-tool deletes sogo_acl table when it restores folders from a user backup 

Activities

ASolana

ASolana

2018-02-07 16:21

reporter  

francis

francis

2018-02-07 16:25

administrator   ~0012581

Duplicating bug reports won't help at all in resolving an issue.

Related Changesets

sogo: master f3189204

2018-04-27 12:34

francis


Details Diff
(sogo-tool) Fix ACLs restore in single store mode

Fixes 0004256
Fixes 0004385
Fixes 0004390
Affected Issues
0004256, 0004385, 0004390
mod - NEWS Diff File
mod - SOPE/GDLContentStore/GCSFolder.m Diff File
mod - Tools/SOGoToolRestore.m Diff File

Issue History

Date Modified Username Field Change
2018-02-07 16:21 ASolana New Issue
2018-02-07 16:21 ASolana File Added: sogo-tool.user.folder.restore.log
2018-02-07 16:25 francis Relationship added duplicate of 0004385
2018-02-07 16:25 francis Note Added: 0012581
2018-03-15 18:37 ludovic Status new => closed
2018-03-15 18:37 ludovic Assigned To => ludovic
2018-03-15 18:37 ludovic Resolution open => duplicate
2018-04-27 16:36 francis Changeset attached => sogo master f3189204
2018-04-27 16:36 francis Assigned To ludovic => francis
2018-04-27 16:36 francis Resolution duplicate => fixed