Koozali.org: home of the SME Server

How to backup SME completely (a la Ghost/Acronis) for complete system recovery?

Offline Michail Pappas

  • *
  • 351
  • +1/-0
Hello all,

I am monitoring an 8.0 (release) server which has a minimal number of contribs (namely a joomla site). I have been given the task of taking backups of it. Data:

* on the same network connected via Gigabit ethernet, a 2Tb NAS exists that I could use to take backups to...
* Connection to this NAS can be made over SMB, NFS or FTP.
* My SME system atm takes about 8Gb (all mounts included). I expect that this will increase at a rate of 2-3Gbytes per year (at most).

Goal: I want to be able backups in such a way that in case of disaster I can perform a complete restore including system, databases, even contribs... Specifically, I intend to take up to daily backups, on a 30 backup rotation. Which would be the easiest way to do it (via contrib or via the built-in mechanisms)?

Offline jameswilson

  • *
  • 795
  • +0/-0
    • Security Warehouse, professional security equipment
none of the sme ways will backup contribs etc.

Offline janet

  • *****
  • 4,812
  • +0/-0
jameswilson

Quote
none of the sme ways will backup contribs...

That's not strictly true.
If you install suitable contribs to ibays they will be automatically included in standard backups.
Despite some users opinions this is quite OK to do.

If you install suitable contribs to /opt/... and include /opt in the backup inclusions, then they will be included in standard backups also.

What reqman is really looking for is a bare metal type backup, but there are no supported sme backup methods doing that.
Mondo did that a few sme versions ago but it is no longer maintained.

The closest reqman will get, is to use a standard sme supported backup, and in the event of a major failure, reinstall the sme OS from CD, restore from backup, and then install any contribs not included in backups (as per above comments). The contribs will use the restored data, so your server will function identically.
Refer
http://wiki.contribs.org/Backup_server_config#Backup_and_Restore_concepts.2C_issues_and_other_information
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline Michail Pappas

  • *
  • 351
  • +1/-0
Thank you and especially Mary, for the detailed explanation... And indeed, I was looking for a bare-metal restore. Based on your explanation(s), as well as the FAQ entries, I think that I'll do backups to workstation, keeping some sort of special, extra joomla backup.

Offline janet

  • *****
  • 4,812
  • +0/-0
reqman

Quote
I think that I'll do backups to workstation, keeping some sort of special, extra joomla backup.

If you move joomla to an ibay, which is fairly simple to do by moving the code, tweaking the config file & renaming the joomla mysql db (to avoid clash with rpm installed joomla if preferred), it will be a part of your backup automatically, all mysql db's are included too.

Altrrnatively just include /opt or /opt/joomla in your backup, refer Contrib wiki article for e-smith backup re backup inclusions.

If you are doing a seperate manual backup of joomla don't foget to do or include a dump of the mysql joomla database or your joomla backup will be useless.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline mike_mattos

  • *
  • 313
  • +0/-0
One nasty way to do this is to use hot swap mirror drives,   and swap one out regularly.  Given the cost of drives, sticking a new bare drive in once a month and re-purposing one of the older backups is feasible.   I may be paranoid, but I hate to see rebuilds when both drives have the same data but with different dates, I feel much safer plugging in a bare drive.
...

Offline janet

  • *****
  • 4,812
  • +0/-0
mike_mattos

Quote
One nasty way to do this is to use hot swap mirror drives,   and swap one out regularly.....

Yes if you have a two drive RAID1 array, then it's feasible to swap a drive every now and again. It's a method I have used a lot over the years.
Saves rebuilding from scratch a mchine with a lot of modifications. You can update data (carefully) from more recent backups, but that can also be a bit of a fiddle.
Last time I looked though (with earlier sme 7.x releases) I think the issue was with the kernel, which did not support hot swap, so you really needed to power down the machine (even if you used so called hot swap drive caddies or bays). It's only a few minutes downtime on modern fast equipment.
Not sure if sme8 kernel supports hot swap.
Every backup/restore method has it's pros and cons.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline mike_mattos

  • *
  • 313
  • +0/-0
Not sure about the kernel, but a hardware raid cage allows any drive to power down,  'hot swap' to the next driver, power up and the SME raid monitor seems to figure it out, and if not, command line can force the matter!

There is a 3 drive cage on the market that is great for this, two live and a spare ready to go, each with its own power switch!   No messy cables to worry about, just take the carrier out to replace with a new drive for next time.
...

Offline janet

  • *****
  • 4,812
  • +0/-0
mike_mattos

Quote
Not sure about the kernel, but a hardware raid cage allows any drive to power down,  'hot swap' to the next driver, power up and the SME raid monitor seems to figure it out, and if not, command line can force the matter!

Purpose specific specialised hardware RAID may work OK.
I was referring to the software RAID1 in sme server, which in many cases is preferable to "fake" hardware RAID.

Let us know how it goes.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline Michail Pappas

  • *
  • 351
  • +1/-0
As far as I can tell, running a "locate joomla" shows everything is installed under /home/e-smith/files/ibays/Primary/

Therefore, it seems I might be covered, correct?

Offline mike_mattos

  • *
  • 313
  • +0/-0
re raid, I use the hardware in dumb mode, so SME does the mirror, the cage just allows the drives to be switched without opening the case or shutting down the server.

The cage holds 3 drives in carriers, typically  SATA 1,2,3.     SME only ever sees SATA1 and SATA2, the third drive is just stored but not powered on,  and moved to the SATA2 slot when the loaded SATA2 drive is removed as a backup.   
...

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
And indeed, I was looking for a bare-metal restore.

Doing a bare-metal restore is not recommended. SME's builtin backup stores configuration and user filesets, and requires a fresh SME server installation as the bare-metal recovery base.

Offline Stefano

  • *
  • 10,894
  • +3/-0
Goal: I want to be able backups in such a way that in case of disaster I can perform a complete restore including system, databases, even contribs... Specifically, I intend to take up to daily backups, on a 30 backup rotation. Which would be the easiest way to do it (via contrib or via the built-in mechanisms)?

use something like vmware esx, proxmox ve or another virtualization solution, virtualize your SME and do a full backup of your virtual machine..

this is the only way to achieve what you are asking for..

Offline mike_mattos

  • *
  • 313
  • +0/-0
Charlie, I'm confused here.  If I put a mirrored drive aside before I test something that may blow up the system,  and then replace it, where is the problem?

Obviously the backups made during the test period cannot be restored except on a file by file basis,  and the drive should go back to the same system it came from.   I can see how restoring an image to a different drive or a different system could be a problem.


...

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Charlie, I'm confused here.  If I put a mirrored drive aside before I test something that may blow up the system,  and then replace it, where is the problem?

No problem. However, that is not a bare-metal restore.