A new utility was provided after release 1.0.4 that enables a site administrator to backup the user data. The utility, named “sogo-tool”, is actually a wrapper around different administrative commands, among which the “restore” and “backup” commands.
In order to backup the data of all, one or some users, you simply need to issue the following command:
sogo-tool backup output-directory ALL
sogo-tool backup output-directory user1 user2 ...
The directory “output-directory” will be created automatically if it does not exist. The backup files will be put there, under the system identifier of the corresponding user. Each backup file will contain the different folders along with their respective acl, the set of user preferences and a copy of the user record found in the LDAP authentication database.
In order to restore the user data, 3 steps are available from the “restore” command.
To list the folders that can be restored for a specific user:
sogo-tool restore -l output-directory user
This will list the different folder ids and corresponding display names. Once chosen, each directory can be restored with the following command:
sogo-tool restore -f folderid output-directory user
This will restore the folder non-destructively, by restoring the items that were deleted after the backup. To restore all available folders, simpy type “ALL” in place of the folder id. Another variant of that command is to use “-F” instead of “-f”, which will restore the data in a destructive manner, restoring the specified folder in the exact state it was when the backup command was issued. Any of those variants will always restore the access lists to how they were at the time of the backup.
Finally, you can restore the user preferences by specifying this:
sogo-tool restore -p output-directory user