Author Topic: Zentyal and Openchange Backup and Restore  (Read 9875 times)

raymond

  • Zen Apprentice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Zentyal and Openchange Backup and Restore
« on: March 05, 2014, 02:10:31 pm »
Hi Guys, I installed Zentyal 3.3 and the Openchange module. I connected Windows 8 with Microsoft Outlook to the Zentyal server and outlook is happy thinking that it is connected to an Exchange Server  8)

Question:

On the community Edition. How will I backup the Openhange emails (database) and where is the email attachments kept. I am not sure what the Zentyal Backup and Restore options backup.

Thank you 

robb

  • Guest
Re: Zentyal and Openchange Backup and Restore
« Reply #1 on: March 05, 2014, 02:26:26 pm »

raymond

  • Zen Apprentice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: Zentyal and Openchange Backup and Restore
« Reply #2 on: March 05, 2014, 02:31:26 pm »
okay that seems simple but Sogo ? Is Sogo  installed on Zentyal ? I missed something here.. :o


robb

  • Guest
Re: Zentyal and Openchange Backup and Restore
« Reply #3 on: March 05, 2014, 02:37:15 pm »
OpenChange is 100% based on SOGo

raymond

  • Zen Apprentice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: Zentyal and Openchange Backup and Restore
« Reply #4 on: March 05, 2014, 02:40:06 pm »
Well then I did miss something here... If it is part of Zentyal then how do I access the Sogo web interface on Zentyal server? I only saw Roundcube as a web client...


robb

  • Guest
Re: Zentyal and Openchange Backup and Restore
« Reply #5 on: March 05, 2014, 03:35:11 pm »
In Zentyal 3.3 roundcube is still used. In Zentyal 3.4 the SOGo webclient is used. See http://labs.zentyal.org/zentyal-webmail-restyle/

peterpugh

  • Guest
Re: Zentyal and Openchange Backup and Restore
« Reply #6 on: March 05, 2014, 04:29:28 pm »
Raymond I really don't know anything about Sogo or Openchange.

Quick browse and it seems it has its own store that is file based.

So I guess if you back up those files maybe... I would have to read more.

With total confusion I can understand.

You have 3.3?

try running sogo-tool backup output-directory ALL maybe you have to be in the right directory and even though the web interface isn't there maybe the tools are?

from a total guess the backup / restore and store is proprietary but looks much better than the database dump of zarafa.

I dunno as haven't managed to have a look yet.

Robb I think he might know roundcube is there and he hasn't got Sogo as a web interface anyway.

/usr/share/doc/sogo/sogo-backup.sh
https://github.com/inverse-inc/sogo/blob/master/Scripts/sogo-backup.sh

Code: [Select]
#!/bin/bash
set -o pipefail

#set -x
PROGNAME="$(basename $0)"

BACKUP_DIR=~sogo/backups
SOGO_TOOL=/usr/sbin/sogo-tool
DAYS_TO_KEEP="30"

DATE=$(date +%F_%H%M)
LOG="logger -t $PROGNAME -p daemon.info"

# log to stdout if on a tty
tty -s && LOG="cat -"

function initChecks {
  if [ ! -d "$BACKUP_DIR" ]; then
    mkdir -m700  -p "$BACKUP_DIR"
    if [ $? -ne 0 ]; then
    echo "BACKUP_DIR doesn't exist and couldn't create it, aborting ($BACKUP_DIR)" | $LOG
    exit 1
    fi
  fi

  if [ ! -w "$BACKUP_DIR" ]; then
    echo "$BACKUP_DIR not writable. Aborting" | $LOG
    exit 1
  fi
}

function removeOldBackups {

  if [ ! -z $DRYRUN ]; then
    RM="echo \"not deleted\""
  else
    RM="rm -rf"
  fi
 
  echo "Deleting old backups..." | $LOG
  find ${BACKUP_DIR}/ -maxdepth 1 -type d -iname "sogo-*" -mtime "+$DAYS_TO_KEEP" -ls -exec $RM {} \; 2>&1 | $LOG
  echo "Done deleting old backups." | $LOG
}


function dumpit {
  mkdir -m700  "$BACKUP_DIR/sogo-${DATE}" 2>&1  | $LOG
  if [ $? -ne 0 ]; then
    exit 1
  fi
  $SOGO_TOOL backup "$BACKUP_DIR/sogo-${DATE}/" ALL 2>&1 | $LOG
  RC=$?
  if [ $RC -ne 0 ]; then
    echo -e "FAILED, error while dumping sogo data" | $LOG
    exit $RC
  else
    echo -e "OK: dumped sogo data" | $LOG
  fi
}

echo "$PROGNAME starting" | $LOG
initChecks
dumpit
removeOldBackups
echo "$PROGNAME exiting" | $LOG

« Last Edit: March 05, 2014, 05:10:44 pm by peterpugh »

peterpugh

  • Guest
Re: Zentyal and Openchange Backup and Restore
« Reply #7 on: March 05, 2014, 05:33:57 pm »
Raymond, openchange and sogo are really exciting and this partnership between Zentyal and Inverse however or in whatever form (As don't know) is really good for existing M$ users.

Also for mixed environments the licensing and services really open things up over a half commercial product such as Zarafa.

3.4 is just due to be released and from 3.3 much work has been done with the addition of openchange and sogo.

So I guess the dev's are frantic at the moment and I think a few things have slipped into 3.3.

It might be by a matter of a week or two and just be the wrong time for evaluation.

Have a look but don't take anything as it is, as it will be.

I can't say as I don't know but presume 3.4 will be stable and have all tools enabled but this will not be till the 15th.

The community edition of Zentyal is always quite bleeding edge 3.3 is more so than usual as I think I am right that 3.4 has slipped back into 3.3 with a few items.

Will be all fixed but I think just at the moment the dev's are maxed out and it might be slower than usual.

So its up to you, a little patience or maybe an older version http://sourceforge.net/projects/zentyal/files/?source=navbar

Also being redhot there is not a massive amount of community knowledge.

Get in touch with sales as you might find out that there are subscriptions for openchange and they might be very competitive.

I can't say as I just don't know.
 
« Last Edit: March 05, 2014, 05:51:09 pm by peterpugh »

raymond

  • Zen Apprentice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: Zentyal and Openchange Backup and Restore
« Reply #8 on: March 13, 2014, 02:39:39 pm »
I think it is a good idea to wait for the new version. Lets see if the backup module has improved.

peterpugh

  • Guest
Re: Zentyal and Openchange Backup and Restore
« Reply #9 on: March 13, 2014, 05:59:00 pm »
http://wiki.sogo.nu/bakupRestore

Because it was part of SOGo which I haven't checked in 3.4 but I am presuming so, then it is much better as it also does brick level.

So in 3.3 without SOGo it left things a little barren.
« Last Edit: March 13, 2014, 06:14:12 pm by peterpugh »

raymond

  • Zen Apprentice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: Zentyal and Openchange Backup and Restore
« Reply #10 on: April 01, 2014, 09:56:10 am »
Hi Guys, I have installed the new version 3.4 that has Openchange.


1) I connected 2 Pc's to the server with roaming profiles enabled.
2) I created a shared folder that can be accesses by the users on the network.
3) I created the following files. (a) a document on the desktop of the PC (b) a document in the "My Documents" folder on the PC and a document in the shared folder on the server.
4) I sent one email to the user and can view the email in Microsoft Outlook.

Backups

1) I selected the include folders as (/var/lib/Mysql) and (/home)

Backup was set to full for 8'Oclock

The Restore process

1) I deleted the documents I created in the Desktop and in My documents. I also deleted document in the shared folder on the server. I then deleted the email item in Microsoft Outlook.
2) I restored all the directories that I included  (/var/lib/Mysql) and (/home)

Results

1) All the documents returned but with a problem on the shared folder on the server. The files cannot be altered (deleted or renamed) permission denied. Had to re-allocate user permissions through the folder share options with the Zentyal interface and apply before the files could be changed or deleted or modified. It seems as the restore function does not restore the correct permissions on the files in the shared folders.

2) Email items were not restored (I cant figure this one out) How do you use the Zentyal Backup to backup email on Zentyal 3.4 ?

Any help will be appreciated.




bertalanimre

  • Zen Monk
  • **
  • Posts: 88
  • Karma: +3/-0
    • View Profile
Re: Zentyal and Openchange Backup and Restore
« Reply #11 on: June 19, 2014, 11:28:48 am »
Yes, yes. An implemented email backup / restore interface would be very usefull.

skynite

  • Zen Apprentice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Zentyal and Openchange Backup and Restore
« Reply #12 on: July 21, 2014, 11:38:00 am »
I would also like to see the backup of Openchange in the user interface, possible integrated with the backup module. This would make it easier for admins to manage.

bertalanimre

  • Zen Monk
  • **
  • Posts: 88
  • Karma: +3/-0
    • View Profile
Re: Zentyal and Openchange Backup and Restore
« Reply #13 on: July 22, 2014, 04:09:33 pm »
Yes, that would be nice. Fortunaltelly I did  not have to resort to that yet. But now, here is the "magic" how can you migrate all your users from 1 mail server to another without losing any mails and you can use your own server in "test mode":

Firsly let's install imapcopy:
Code: [Select]
sudo apt-get update
sudo apt-get install imapcopy

You have to edit the config file of it: ( I use mcdeit )
Code: [Select]
mcedit ImapCopy.cfg ( normally inside the home folder )

Code: [Select]
SourceServer server.source.com
SourcePort ***
DestServer server.destination.com
DestPort ***

#          SrcUser       SrcPasswd            DestUser        DestPasswd
Copy   "SrcUser1@source.com"           "secret"           "DestUser1@destination.com"               "anothersecret"
Copy   "SrcUser2@source.com"           "secret"           "DestUser2@destination.com"               "anothersecret"
etc....

After this, you just run
Code: [Select]
imapcopy in a terminal and the mentioned users imap profiles will be copied to the local mail server. I repeat. You have COPIED them. So you won't miss anything in case of a failiure.

Continue soon....... Now have to go, sry.