Koozali.org formerly Contribs.org

Standby machine for disaster recovery restore ?

Standby machine for disaster recovery restore ?
« on: November 08, 2018, 10:58:15 AM »
Hi all,

I use SME 9.2 for our office email and keeping a little data in the i-bays.  It's a small setup of say 5 users with a few years email.

It's sitting on an oldish PC and works very well, however I'd like to have an 'easy' disaster recovery plan in place.  I've set up a 'twin' machine of the same type and specification (Both Dells of the same model) with the idea that I should be able to switch on the spare machine and restore directly from the NAS back ups I run.  This machine has SME9.x plus the same contribs. 

If a recovery is required it's certain that the install on the spare machine will be out of date, so an update process will be needed at some point in the process. This is something I'd usually do from the web based /server-manager/ and copy paste the contribs update commend from the alert email.  Ideally I'd do this post restore.

My question is, is this plausible ?

I'm out of office a fair bit so need to try and get something in place that's relatively easy to do should I not be around.

Thanks for your thoughts

Best

David




Offline ReetP

  • *
  • 1,593
Re: Standby machine for disaster recovery restore ?
« Reply #1 on: November 08, 2018, 12:35:03 PM »
It depends on how much down time you are prepared to suffer.

If you only turn on the back up machine periodically you will have to wait for it to boot, run updates, and the restore from your backups,k and can you do that all remotely ??

That will take as long as it takes.

If you want a faster restore then run the backup machine as an Affa backup. You can dictate how often it runs backups, and if the main machine goes down you can 'Rise' the Affa box in minutes. It means the machine is on and you can update it as you go. You can shell in and access/rise at a command prompt if required - that may not be so easy with your proposed method.

(I think some people actually have the Affa box on a timer to wake it, run a backup, and put it to sleep again, if you don't want it running 24/7 - question is whether you can wake it remotely when you need to do a restore)

You pays your money and you takes your choice....
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline brianr

  • *
  • 856
Brian j Read
(retired, but still looking after 5 SME installations)
.........

Offline mmccarn

  • *
  • 2,316
Re: Standby machine for disaster recovery restore ?
« Reply #3 on: November 08, 2018, 12:48:21 PM »
Affa
I have not used it for years, but Affa was practically magical for this use case when I did use it:
- Full system backup (including snapshots) maintained on a second system
- One line command to convert the backup system into a running clone of the active server for disaster recovery

Properly configured, all you need is remote access to the network to convert the backup server into the "live" server.

Restore during setup
If your situation can handle the recovery time, you could schedule a regular backup of the primary SME server to a USB drive, then practice regular system restores from "bare metal" (boot the install disk, restore during setup).  You would need to identify and document separate backup procedures anything for that is not included in this process, since it is possible to add software or web apps to your SME server that are not included in the USB backup by default.

Roll your own
You can also create your own manual backup using rsync or scp.  I still use a variation of smeclone.sh script in Bug  5701 to migrate a SME server to new hardware.  That script is intended for upgrading rather than backup -- but it includes notes that may be useful if you want to roll your own disaster recovery system.

Re: Standby machine for disaster recovery restore ?
« Reply #4 on: November 08, 2018, 05:39:24 PM »
Thanks All,

Simplicity probably trumps reduced down time, especially if it's something I can do remotely say via a logmein style login to one of the client machines here.

In the past I have restored the system 'long hand' and have notes to that,  but it would be nice to have something less reliant on me being physically present in place.

One of the problems I recall with turning on the backup box 'as is' is that it shares the same IP as the 'live' one which causes issues, but I guess if I am only pulling down updates that can be changed, as long as it's in the correct ip range. 

Affa seems to offer some options - I'll have a read.

Re: Standby machine for disaster recovery restore ?
« Reply #5 on: November 09, 2018, 02:47:01 PM »
Affa looks a good solution :)

My main concern is be that by Linux skills could be graded at 'script kiddy' level and the set up looks relatively complex.

If I understand it correctly it's a case of setting up a fresh SME server with the required contribs and installing Affa as per here:

https://wiki.contribs.org/Affa#tab=For_SME9

The Rise function looks straight forward, I think my concern will be setting up the backup so that everything gets backed up.

What do you reckon ?

Offline ReetP

  • *
  • 1,593
Re: Standby machine for disaster recovery restore ?
« Reply #6 on: November 09, 2018, 06:02:27 PM »
It's not that bad, and if you ask nicely you'll get some help ;-)

It really is one of the outstanding features of SME, and it really should have a bigger name for itself - it would be nice to do a panel for it. The time to rise it is measured in a few minutes.

Particularly as you don't have much data you can easily test it. Just disconnect the new backup affa box before you do a 'rise' so you don't end up with two identical machines on the network :-)

So, the wiki page looks bad but it isn't really, though it is well worth gently reading through a few times just to get your bearings.

Essentially:

Code: [Select]
yum install smeserver-affa --enablerepo=smecontribs
Code: [Select]
mkdir /var/affa
Reboot

Add in your contribs at some point.

Code: [Select]
touch /etc/affa/backup-smeserver.conf
Add your remote server details - just swap the IP address to match

Add in extra dirs  you want included eg dehydrated/letsencrypt

Make sure your remote server to back up has ssh enabled and you can login with a password to send the ssh key (test first)

Test run your backup - the fisrt will take a while. Thereafter it will be very quick as it only copies the changed files.

That's about it - tweak away.....

NB. Make sure you have enough disk space for all the 'Keeps'

You can go back and pull individual files from each backup if needed which is handy when they delete something they later wanted...... :-)

Enjoy.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Re: Standby machine for disaster recovery restore ?
« Reply #7 on: November 12, 2018, 06:11:33 PM »
ReetP Thank you.

I'll have a play and see how I get on. I may indeed ask for some help  8-)

Just for clarification, when you say "Add in your contribs at some point." do you mean install them afresh via yum or include them in some way in the Affa backup ?

Quote
Make sure your remote server to back up has ssh enabled and you can login with a password to send the ssh key (test first)

I think more reading required but I'll have a go and ask here later with the inevitable questions.

Thank you again :)





 


Offline ReetP

  • *
  • 1,593
Re: Standby machine for disaster recovery restore ?
« Reply #8 on: November 12, 2018, 06:24:48 PM »
When you set up your affa box, at some point add in any of your existing contribs so they are there ready in case you 'Rise' it. You can do that any time.

If you read the manual and have a go, no one will mind helping answer sensible questions :-)
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Re: Standby machine for disaster recovery restore ?
« Reply #9 on: November 13, 2018, 01:24:07 PM »
When you set up your affa box, at some point add in any of your existing contribs so they are there ready in case you 'Rise' it. You can do that any time.

If you read the manual and have a go, no one will mind helping answer sensible questions :-)

Thanks. I will do :)