In the current version of ISPConfig backups are available only for websites and databases. This is a backport from the devel-version for the next major release.
The backups of emails work like the backup of websites or databases. Under the respective mailbox is a new tab named “backup”.
Installation
cd /tmp
wget blog.schaal-24.de/files/mailbackup-latest_ispconfig3.tar.gz
tar xfz mailbackup-latest_ispconfig3.tar.gz
or using git
git clone https://git.schaal-24.de/ispconfig/mailbackup.git
cd mailbackup
php -q install.php
I am sorry, but this plugin does not seem to be compatible with 3.1.15p2. Thank you.
the mail-backup is already a part of the ispconfig-core since 3.1
Ist MailBackup mit der aktuellen ISPConfig 3.1 kompatibel?
Das ist ein Backport aus meinen Änderungen für die 3.1. Die Funktionen sind identisch und bei einem Update auf 3.1 bleibt alles im Wesentlichen unverändert.
Könnten alle Nutzer mal im Verzeichnis “/var/backup/mail*/” nachschauen, ob da auch wirklich .zip bzw. .tar.gz Dateien drinnen liegen.
Damit es bei mir unter der 3.0.5.4p8 läuft musste ich zumindest einiges ändern.
Ich glaube es liegt ein Fehler in der Programmierung vor und wenn es bei einer Domain mehr als ein E-Mail-Konto gibt und nicht für alle E-Mail-Konten dieser Domain ein Backup angelegt wird, dann werden die Backups zwar in der Datenbank und der Weboberfläche angezeigt, jedoch im Verzeichnis “/var/backup/mail*/” gelöscht.
Sollte das so sein, kann ich gerne meine angepasste Version zur Verfügung stellen.
You can submit your changes on our git: git.ispconfig.org
But you can also drop me a mail
Hi,
Thanks for the script very useful and well integrated into ispconfig3.
Just a quick note to avoid to other people the same problem I got. I spent some time to find why the backup was not created, it was recorded into the database but no trace of the file anywhere. Firstly I thought it was a permission issue or a php issue (exec) after some investigations I found that the problem was related to this part of the script (Remove inactive backups). For a reason that I don’t understand as soon as my backup was created it was deleted a few lines below. I just put into comments the 2 following lines :
/usr/local/ispconfig/server/mailbackup.php.inc
~136 and l ~157 unlink($mail_backup_dir.’/’.$files[$n]);
it is probably something specific to my case (still need to investigate why it happens) but if it can help others.
Echt super Klasse!
Das ist der genau das was ich gebraucht habe. So kann man bequem die Daten von Server zu Server umziehen mit Mails wenn der Kunde das wünscht.
Danke Danke Danke!!!
Nice Backport, is it possible to set different default values for the backup options, like “3 daily backups” of all mailboxes?
Not without changing the code. 😉
Exactly the plugin i was looking for to move to a new server!
How do I trigger the backup? I’ve looked in crontab and cron.d but I find no clues how to make a backup directly. Also within ispconfig (i have 3.0.5) I searched through all tabs but cant find a button to create or restore backup. And where will the backup be stored?
Probably “anwenderhehler” but any help is appreciated 😉
backup directory found under server config for a specific server
You can restore a backup under email / email mailbox / backup
The mail-backup is part of the cron_daily-script (include “/usr/local/ispconfig/server/mailbackup.php.inc”; in cron_daily.php).
Thank you for quick response. I try to run the daily_cron with daily_cron.sh.
I get the following error, similar with dkim mentioned above:
“`
syntax error, unexpected ‘[‘ in /usr/local/ispconfig/server/mailbackup.php.inc
“`
on line 80
`$email=explode(“@”,$email)[1];`
I have cloned the latest version of mailbackup with git clone today
The problem is in the line, only works with php 5.4 and up
$email=explode(“@”, $email)[1];
replace it with:
$email=explode(“@”, $email); $email=$email[1];
I just updated the git: https://git.schaal-24.de/ispconfig/mailbackup/commit/f27deadfcbb24e9ffc1988eb382cacd10346f1f3. Please clone it again.
Hi so same problem with this mail plugin
Fri Oct 24 00:30:01 CEST 2014 PHP Parse error: syntax error, unexpected '[' in /usr/local/ispconfig/server/mailbackup.php.inc on line 79
i suspect it is the same bug with php 5.3 as you fixd for the dkmi patch.
can you confirm this?
unfortunately i can confirm this. It´s now fixed in the git and the archiv. thanks for your help.
Pingback: Anonymous
Thank you! I’m wondering why it’s not added to official repo 🙂 Good work!
This will be a part of the next major-release.
Hi,
nice! Can you show some Screenshots of the new Tab?
Is this only possible for selected mail accounts or for all accounts of an mail domain too?
best regards,
daniel
I just added a screen-shot. As mentioned above you can set the backups for each mailbox. I don´t think it´s a good idea, to backup a full mail-domain. This leads to very big archives and it´s quite difficult to restore a single mailbox in this case. The Backup is equal to the web-backups, so your customers can set the backups for their own.