Koozali.org: home of the SME Server

Manual (file by file) backup and restore

Offline Oosterheert

  • *
  • 18
  • +0/-0
Manual (file by file) backup and restore
« on: February 16, 2007, 10:21:22 AM »
One of our customers has an sme server with critical data, but not the discipline and will to make good backups on tape every day.

They now want a backup over internet, using special software. We've been able to install this software and backupped some files.
With this backup we can now backup all the contents of the ibays and I'm pretty sure i can make it to backup a dump of MySQL as well.

However we also want to backup the users, settings and configuration etc of SME itself, in case of complete failure/fire etc.
We can't use the normal backup routines that SME has. We have to backup each important file manually and in case of restore have to copy it back.

For testing I did a 'backup to desktop' on a fresh testserver and found that it makes a backup of the following:

/root/
/home/e-smith/
/etc/samba/
/etc/ssh/
/etc/group
/etc/gshadow
/etc/passwd
/etc/shadow
/etc/sudoers

Now my first question: Is it possible to use these files to get a new server up and running in a short time in case of emergency?

If so, is it also possible to use these files on a new server, that is completely different in Hardware? As in from a Pentium3 to a Intel Xeon dualcore server?

I ask these questions because i tried it with our own server and failed...

I copied these files from our own server and pasted them on the testserver that had a fresh install of SME.
It did appear to work after a signal-event post-upgrade and a signal-event reboot. The users, ibays, settings etc where there. I only had to run the configuration so that the new NICs were properly used.

However when i wanted to go to a shared mapping on the new server, i couldn't log on to it by using a user and password i had migrated. I did get on using admin and the testpassword i had made on the testserver, not the admin password from the original server

So it seems to me that SME has the users migrated well, but Linux doesn't 'know' them...?

Offline bpivk

  • *
  • 908
  • +0/-0
    • http://www.bezigrad.com
Manual (file by file) backup and restore
« Reply #1 on: February 16, 2007, 10:35:24 AM »
Quote
Now my first question: Is it possible to use these files to get a new server up and running in a short time in case of emergency?

Yes. The backup has all the files needed for the new server.


Quote
If so, is it also possible to use these files on a new server, that is completely different in Hardware? As in from a Pentium3 to a Intel Xeon dualcore server?

Yes. The only thing you have to do is to configure the new disks, NIC's and other hardware (on new install).

The admin password doesn't change with the backup. You have to use the new pass. Why? What would happen if you'd forget the admin pass on an old backup copy? Well now you know why it's a good thing that admin pass doesn't change.
"It should just work" if it doesn't report it. Thanks!

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Manual (file by file) backup and restore
« Reply #2 on: February 16, 2007, 10:59:04 AM »
Oosterheert

You missed a few.
Here is the full backup & restore requirements, as well as a mysql dump.
http://forums.contribs.org/index.php?topic=35673.0

Search on backup, restore, dump as all the information you need has been answered in the forums many many times.
You should look at the backup scripts to see what events occur during backup & restore operations.
It sounds like you are trying to recreate the wheel as many backup/restore options exist as add on contribs eg smeserver-dar2.
Search the forums for alternatives to backup across Internet.
...

Offline raem

  • *
  • 3,972
  • +4/-0
Manual (file by file) backup and restore
« Reply #3 on: February 16, 2007, 11:04:11 AM »
bpivk

> The admin password doesn't change with the backup.

I don't believe that's correct.
A properly backed up and restored server is a duplicate of the original including passwords & every other thing, except installed contribs.
Even the NIC configuration will be wrong (old servers settings) if you have different hardware in the new box, until you do a reconfiguration from the admin console, which you usually should always do.
...

Offline Oosterheert

  • *
  • 18
  • +0/-0
Manual (file by file) backup and restore
« Reply #4 on: February 16, 2007, 02:58:57 PM »
Done another manual backup, this time with the proper pre-backup/post-backup commands and this time it did work beautifully.

Thanks!  :D

Offline bpivk

  • *
  • 908
  • +0/-0
    • http://www.bezigrad.com
Manual (file by file) backup and restore
« Reply #5 on: February 16, 2007, 03:54:31 PM »
Well i knew about the old NIC's but i really didn't know about the admin pass. (Never needed to do a restore.)

Thanks for clearing that up.
"It should just work" if it doesn't report it. Thanks!