hMs Built in back up

Forum for things that doesn't really have anything to do with hMailServer. Such as php.ini, beer, etc etc.
Post Reply
User avatar
Slug
Moderator
Moderator
Posts: 1369
Joined: 2005-03-13 05:42
Location: Sydney Australia
Contact:

hMs Built in back up

Post by Slug » 2009-09-27 14:25

Hi Martin

I know there is a limitation on the internal back up function of approx 1.5 gig. But I would like to know what particularly is the limitation from ? Is it a limitation of the zip function or something else.

The reason I'm asking is my mail server is now hitting this limit on a almost daily basis (depending on how many emails I have deleted). and I would like to know what my options are.

Thanks
Missing Hmailserver ... Now running Debian servers

User avatar
martin
Developer
Developer
Posts: 6837
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Re: hMs Built in back up

Post by martin » 2009-09-27 14:33

Actually, the user interface says 1GB, not 1.5GB. :) The limitation lies in the zip functionality, and in the fact that the backup procedure/code is too slow to work efficiently with larger installations. It will take a long time to restore more data, which is why other alternatives is recommended.

If your installation is larger, just do a mysqldump and backup the data directory using robocopy/xcopy.

^DooM^
Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

Re: hMs Built in back up

Post by ^DooM^ » 2009-09-27 14:40

Write a batch file to dump the database on a scheduled task, then use cobian backup to zip up the data dir (can be all or just changed files since last backup) and the SQL dump then copy/move/ftp it elsewhere.
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

User avatar
Slug
Moderator
Moderator
Posts: 1369
Joined: 2005-03-13 05:42
Location: Sydney Australia
Contact:

Re: hMs Built in back up

Post by Slug » 2009-09-27 14:46

martin wrote:Actually, the user interface says 1GB, not 1.5GB. :)
So it does, but not in the log :P :P :P Says 1.5...

I will start looking at alternatives.

Thanks
Missing Hmailserver ... Now running Debian servers

User avatar
Slug
Moderator
Moderator
Posts: 1369
Joined: 2005-03-13 05:42
Location: Sydney Australia
Contact:

Re: hMs Built in back up

Post by Slug » 2009-09-27 14:47

^DooM^ wrote:Write a batch file to dump the database on a scheduled task, then use cobian backup to zip up the data dir (can be all or just changed files since last backup) and the SQL dump then copy/move/ftp it elsewhere.
I remember seeing a thread you posted a while back on this, I will go dig it up.

Thanks
Missing Hmailserver ... Now running Debian servers

^DooM^
Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

Re: hMs Built in back up

Post by ^DooM^ » 2009-09-27 14:49

The file i posted was a linux bash script, won't work on windows.
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

User avatar
Slug
Moderator
Moderator
Posts: 1369
Joined: 2005-03-13 05:42
Location: Sydney Australia
Contact:

Re: hMs Built in back up

Post by Slug » 2009-09-27 14:49

Ahh could be a sight issue then .. :lol: :lol: :lol:
Missing Hmailserver ... Now running Debian servers

User avatar
mattg
Moderator
Moderator
Posts: 21183
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: hMs Built in back up

Post by mattg » 2009-09-27 15:20

here's mine, I modified Doom's to a windows batch file, I run it as a scheduled task

Code: Select all

rem
rem Backup hMailserver data directory and database
rem

erase /Q C:\Backuptemp\*.mysql
net stop hmailsever
robocopy "c:\Program Files\hMailserver\Data" c:\BackupTemp /mir
copy "c:\Program Files\hMailserver\bin\hmailserver.ini" c:\BackupTemp /Y
cd C:\Program Files\MySQL\MySQL Server 5.0\bin
mysqldump -u"root" -p"XXXXXXXX" -q -A -l --add-drop-table -P3307 >"C:\backupTemp\MYSQLDump %date:~10,4%-%date:~7,2%-%date:~4,2% %time:~0,2%%time:~3,2%.mysql"
net start hmailserver

cd C:\Program Files\7-Zip
7z a -tzip "C:\Backups\hMailserver %date:~10,4%-%date:~7,2%-%date:~4,2%" C:\BackupTemp\*
It uses robocopy and then 7-Zip for the compression
It has a dummy directory at C:\BackupTemp\ and writes the zipped file to C:\Backups\ and has the date in the final zipped file name

Oh, and been meaning to test that I can restore, just haven't got to that yet, so don't rely on it without testing please
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

User avatar
Slug
Moderator
Moderator
Posts: 1369
Joined: 2005-03-13 05:42
Location: Sydney Australia
Contact:

Re: hMs Built in back up

Post by Slug » 2009-09-27 15:22

Thanks .. I give it a shot tomorrow.
Missing Hmailserver ... Now running Debian servers

User avatar
Slug
Moderator
Moderator
Posts: 1369
Joined: 2005-03-13 05:42
Location: Sydney Australia
Contact:

Re: hMs Built in back up

Post by Slug » 2009-09-27 15:23

1 more thing Matt, I guessing from that you are using the internal DB ?

Nope, ignore that .....

Whats the p3307 for ?
Missing Hmailserver ... Now running Debian servers

^DooM^
Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

Re: hMs Built in back up

Post by ^DooM^ » 2009-09-27 15:29

That is port.
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

User avatar
Slug
Moderator
Moderator
Posts: 1369
Joined: 2005-03-13 05:42
Location: Sydney Australia
Contact:

Re: hMs Built in back up

Post by Slug » 2009-09-27 15:31

^DooM^ wrote:That is port.
Ok that was my guess... hence the first question.


Thanks
Missing Hmailserver ... Now running Debian servers

DeanoX
Senior user
Senior user
Posts: 480
Joined: 2005-11-05 00:07
Location: Michigan

Re: hMs Built in back up

Post by DeanoX » 2009-09-28 17:25

I use the mysql administrator's included scheduled backup service, to create the mysql backups. Then I use cobian backup, to manage the backups locally, and also send backups offsite, using an out of band FTP backup server.
Works rather nicely.

User avatar
Slug
Moderator
Moderator
Posts: 1369
Joined: 2005-03-13 05:42
Location: Sydney Australia
Contact:

Re: hMs Built in back up

Post by Slug » 2009-09-29 14:50

DeanoX wrote:I use the mysql administrator's included scheduled backup service, to create the mysql backups.
Which one ? mine does not have a scheduled backup

Michael
Missing Hmailserver ... Now running Debian servers


westdam
Senior user
Senior user
Posts: 728
Joined: 2006-08-01 21:24
Location: Padova, Italy
Contact:

Re: hMs Built in back up

Post by westdam » 2009-10-06 16:40

a newbie question to this argument :
what about to use the 7zip algorythm in the integrated backup?should this solve the zip limitations?

except the restoring speed of course... still slow on large system.

User avatar
sheffters
Senior user
Senior user
Posts: 453
Joined: 2009-07-01 20:46
Contact:

Re: hMs Built in back up

Post by sheffters » 2009-10-06 16:51

zip files arent limited in size anyway ... I've got loads of them several GB for vmware shells and the like.

S.

User avatar
Slug
Moderator
Moderator
Posts: 1369
Joined: 2005-03-13 05:42
Location: Sydney Australia
Contact:

Re: hMs Built in back up

Post by Slug » 2009-10-06 17:03

Not 100% true

http://winzip.com/wzdic.htm (old format / 4Gb/65535 files)

Also (and I don't know here) if hMs backup is using the "internal zip" in windows there maybe some limitations as well.

Michael
Missing Hmailserver ... Now running Debian servers

^DooM^
Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

Re: hMs Built in back up

Post by ^DooM^ » 2009-10-06 17:03

Pretty sure it has to do with the size of the XML file that is generated when you save with messages.
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

User avatar
Slug
Moderator
Moderator
Posts: 1369
Joined: 2005-03-13 05:42
Location: Sydney Australia
Contact:

Re: hMs Built in back up

Post by Slug » 2009-10-06 17:08

^DooM^ wrote:Pretty sure it has to do with the size of the XML file that is generated when you save with messages.
This could be true, because it wont backup even if I un-tick the option to zip the backup.
Missing Hmailserver ... Now running Debian servers

westdam
Senior user
Senior user
Posts: 728
Joined: 2006-08-01 21:24
Location: Padova, Italy
Contact:

Re: hMs Built in back up

Post by westdam » 2009-10-06 21:39

mmm ok..
what about speed instead? 7zip is open and free format isn't it? and it's fast..could be used right?

^DooM^
Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

Re: hMs Built in back up

Post by ^DooM^ » 2009-10-06 21:49

Probably not not hMail is closed source. I haven't found 7zip to be that much faster than winzip or winrar's zip function in my years using them.
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

westdam
Senior user
Senior user
Posts: 728
Joined: 2006-08-01 21:24
Location: Padova, Italy
Contact:

Re: hMs Built in back up

Post by westdam » 2009-10-12 15:52

well, theorically should be faster and better as compression quality.
but i think we're speaking of ms or kbyte

Post Reply