Backup and restore

Backup your Sogo server

there are a tool for backup and restore (and other things). This tool is called sogo-tool. With it you can backup and restore your server.

Backup user

#sogo-tool backup /mybackupdir my.user

or to for backup all the users

#sogo-tool backup /mybackupdir ALL

Restore your datas

For one user :

Restore the parameters (signature, filters ....)

#sogo-tool restore -p /mybackupdir my.user

To see what is in the backup

#sogo-tool restore -l /mybackupdir my.user

Restore the folders for one user

#sogo-tool restore -f ALL /mybackupdir my.user

Restore only one folder (Calendar or contacts)

find the name with sogo-tool restore -l /mybackup my.user and

#sogo-tool restore -f mycontacts /mybackupdir my.user

for restoring all the users you have to make a little script :

USE_SIEVE=$(grep 'SOGoSieveScriptsEnabled = YES;' /etc/sogo/sogo.conf|cut -d '=' -f 2)

for i in `ls`
  # create account in SOGo and set general preferences
  sogo-tool restore -p "${MYBACKUPDIR}" "${i}"

  # create and fill all calendars and addressbooks
  sogo-tool restore -f ALL "${MYBACKUPDIR}" "${i}"

  if [ "${USE_SIEVE}" = ' YES;' ]
    # restore all ACLs and SIEVE scripts
    sogo-tool restore -p -c /etc/sogo/sieve.creds "${MYBACKUPDIR}" "${i}"
    # restore all ACLs
    sogo-tool restore -p "${MYBACKUPDIR}" "${i}"

see also the FAQ article :

a script is shipped with the Sogo package to make automaticly the backups :




Edit them to customize

Enjoy! :-)