Backup/Restore Scripts - updated with restore script

Discuss the Scalix Server software

Moderators: ScalixSupport, admin

ianare
Posts: 61
Joined: Tue Sep 19, 2006 1:13 pm

Postby ianare » Thu Oct 12, 2006 1:54 pm

edit: -nevermind-

arunav

Postby arunav » Wed Nov 22, 2006 5:59 pm

So how long will be the downtime if there are around 200 users?

ianare
Posts: 61
Joined: Tue Sep 19, 2006 1:13 pm

Postby ianare » Fri Nov 24, 2006 2:14 am

number of users isn't important, all user messages are saved with the server running.

The size of the scalix directory is what will make a difference. The first time it will take longer to rsync since its basically doing a copy, but successive times afterwards it will be shorter since it just needs to copy modified files over. Can't say how long it will take, there are a lot of variables... processing power/ hard drive speed/ size of directory / load on server/ amount of file modifications/ etc..

I actually made another setup that speeds things up a bit by rsyncing to the same directory every day, then using another script to divide into 7 days. this way there is less to rsync every time, and the other script runs with the server running. I'll post it next time I'm at the office.

If you really want a number though, it takes us less than 3 minutes to run the entire script, but we have a very small setup - about 2gb of mailboxes - and a quite powerful server (but which does other stuff too).

Also, keep in mind you are just shutting down scalix, not sendmail. Mail will still come through, just delayed a bit.

Cheers,

ianaré

ianare
Posts: 61
Joined: Tue Sep 19, 2006 1:13 pm

Postby ianare » Mon Nov 27, 2006 3:50 pm

ok script's up on the wiki 8)

les
Scalix Star
Scalix Star
Posts: 819
Joined: Thu Feb 23, 2006 10:18 am
Location: Sydney, Australia

Postby les » Mon Dec 04, 2006 5:25 pm

ianare wrote:ok script's up on the wiki 8)


a great script.

what about omrestore? i cant find it on the wiki?
Regards,

Les Stott

mito
Posts: 194
Joined: Fri Mar 24, 2006 11:33 am

Postby mito » Thu Jan 04, 2007 12:03 pm

Has anyone tested this with Scalix 11 yet?

With all the changes from Scalix 10 to Scalix 11, does this still work? I'm getting ready to migrate over to Scalix 11, but I want to make sure I have everything figured out before I do.

*edit*
Ok, so after re-reading this thread again (it had been several months since I read it originally when setting up my backups) I rediscovered this post:
http://www.scalix.com/community/viewtop ... 6712#16712

Which basically says that while this script should still work in Scalix 11, there will be a much better way to do it. So, with that said, has anyone already done this legwork to update this script to the new methods?

Technica
Posts: 15
Joined: Wed Dec 20, 2006 3:10 pm

Postby Technica » Thu Jan 04, 2007 12:14 pm

Has anyone tried the new methods in 11? is it worth pursuing these scripts?

ls-al
Scalix Star
Scalix Star
Posts: 510
Joined: Tue Jun 29, 2004 8:28 am
Location: Leipzig, Germany
Contact:

Postby ls-al » Sun Jan 07, 2007 5:53 pm

FYI: I modified this script for Scalix 11 because I need this next week for a customer

changes to the original script:
- replaced omcpoutu with sxmboxexp
- removed the need of specifying the mailnode, it will dump all mailnodes by default
- added the dump of public folders
- !!!removed the complete rsync stuff

I decided to strip off the code for the complete rsync backup for two reasons:
- this customer dont needs this at the moment
- I want to rewrite this with optional LVM/omsuspend support as a seperate script.

It is not fully tested, so I dont want to put it at the Wiki at the moment, but will do this in the next days.

For the impatient: see http://www.it25.de/downloads/sx_dump

Best Regards,
Dirk

mito
Posts: 194
Joined: Fri Mar 24, 2006 11:33 am

Postby mito » Mon Jan 08, 2007 12:10 am

ls-al wrote:I decided to strip off the code for the complete rsync backup for two reasons:
- this customer dont needs this at the moment
- I want to rewrite this with optional LVM/omsuspend support as a seperate script.

It is not fully tested, so I dont want to put it at the Wiki at the moment, but will do this in the next days.


Sounds great, but I wouldn't remove the current script from the wiki, as it would be good to have this still there for the v10 users. Make a new page for it in the wiki maybe, or perhaps put them both on the same page, noting which is for 10 and which is for 11, and listing these changes here.

Also, instead of stripping it out, (I realize stripping it out is good for you personally as it suits your needs, but for the wiki's sake) I would add an option at the top in a variable (rsyc_backup = 'Y') and have that variable checked before running the rsync portion. Easier for people to just edit that option than to have to re-invent the wheel to add that stuff back in.

I have some similar changes that I made that include taring the entire backup set up and then putting that on a remote share, something I did because my network storage was on a windows system and the standard rsync spewed a lot of errors because of it. I was going to edit in those changes on the wiki, but then it was so close to the v11 change that I just decided not to do so.

Thanks for the update on the script, I think I will be upgrading next weekend, so I will have to try it out then.

Mito

btisdall
Scalix Star
Scalix Star
Posts: 373
Joined: Tue Nov 22, 2005 12:13 pm
Contact:

Postby btisdall » Fri Feb 09, 2007 10:04 am

ls-al wrote:FYI:

For the impatient: see http://www.it25.de/downloads/sx_dump

Best Regards,
Dirk


Hi ls-al,

just wondering why:

Code: Select all

$SCALIX_BIN/sxmboxexp -p -f $PFNUMERIC -a - -F | gzip | cat > $BACKUP_FILE


and not:

Code: Select all

$SCALIX_BIN/sxmboxexp -p -f $PFNUMERIC -a - -F | gzip -c > $BACKUP_FILE


?
Ben Tisdall
www.redcircleit.com
London

mglenney
Posts: 50
Joined: Fri Dec 08, 2006 12:22 am

Postby mglenney » Fri May 11, 2007 4:17 am

According to the gzip man page it should look like this:

Code: Select all

 $SCALIX_BIN/sxmboxexp -p -f $PFNUMERIC -a - -F | gzip > $BACKUP_FILE



Also, where does everyone stand with this ls-al's script? Have you tried it? What do you think? I don't have a test system to play with so I haven't tried it yet but will soon.

MG

btisdall
Scalix Star
Scalix Star
Posts: 373
Joined: Tue Nov 22, 2005 12:13 pm
Contact:

Postby btisdall » Fri May 11, 2007 7:06 am

mglenney wrote:According to the gzip man page it should look like this:

Code: Select all

 $SCALIX_BIN/sxmboxexp -p -f $PFNUMERIC -a - -F | gzip > $BACKUP_FILE



I must say I find the manpage rather ambiguous in this regard, both work the same, I guess '>' implies '-c'. That 'cat' was definitely redundant though.

Ben.
Ben Tisdall

www.redcircleit.com

London

ls-al
Scalix Star
Scalix Star
Posts: 510
Joined: Tue Jun 29, 2004 8:28 am
Location: Leipzig, Germany
Contact:

Postby ls-al » Fri May 11, 2007 7:48 am

Unfortunately I did not have the time to more work on this as planned. Some people here may know why :) .
But this script is currently running on several systems without problems. (biggest installation: 1000 mailboxes with 25 parallel jobs, backup-time 4 hours).

Anyway, its still work on it and I will hopefully have this finshed until Scalix 12 is released.

cheers from Edinburgh

mito
Posts: 194
Joined: Fri Mar 24, 2006 11:33 am

Postby mito » Fri May 11, 2007 9:17 am

I have a modified version of it where it backs up to a local directory and then tars it up and dumps it onto a remote storage (the remote storage is a windows-based NAS so I can't do rsync right to it, unfortunately).

It works very well and I was going to try to update the wiki page to include both options, but apparently forgot all about it. Maybe this weekend if I get a chance?

salman

Postby salman » Tue May 15, 2007 7:41 am

Hi, This post is very informative, however I would like some specific information. If someone can help me then please send me a private message. Best Regards,


Return to “Scalix Server”



Who is online

Users browsing this forum: No registered users and 23 guests