Agent86
Your backup questions have been answered many times in these forums so I suggest you do a search on backup.
Here it is again as succinctly as I can put it.
The sme backup & restore concept is that only certain data & config files are backed up. These are sufficient to rebuild your server to the way it was ie from a data integrity point of view eg users, pseudonyms, ibays, mail, mysql dbs, custom templates, & other system data etc, but this does not include add on contrib rpms. Note that the config files for contribs will be backed up and restored but not the contrib rpms themselves.
When you restore a backup file it should ONLY ever be to a fresh install of the operating system, which means that after the restore is complete you should then reinstall the ad on contrib rpms. Then your server will be the same as the original.
Other backup contribs such as backup2 or backupdar use the same concept, so they do not backup and restore contribs either.
The default backup to desktop also does the same thing BUT it is limited in usefullness due to the 4Gb backup file creation limits and even worse 2Gb restore file size limits. So any backup you create with that feature, you must ensure the resultant backup file is smaller than 2Gb if you wish to be able to restore from it.
ALWAYS check the integrity of the backup file after you perform a backup to desktop, the routine is in the server manager panel, that ensures your backup file is good (but it still must be less than 2Gb to be restorable).
If you have a "small" server with very limited amount of data on it, the backup to desktop function is useful & quite good.
For many servers with tens or hundreds of Gb's of data is is NOT usable. You then need to use tape or backup2 or backupdar or some other method.
Tape backups do backup all the files on the server, but they are not all restored, only the limited set mentioned above are restored, so essentially you still need to reinstall all contribs after a tape backup & restore. Search the FAQ for details of what is backed up and restored.
The only way to backup your whole fully configured hard disk including the installed contribs is to do a disk clone using appropriate tools.
The linux dd command will copy the whole hard disk bit by bit to another connected disk but it will take many hours.
for usage
man dd
There are cloning software eg Ghost, there is the Mondo contrib and there are GPL clone solutions too. Make sure they handle RAID drives correctly.
A practical way to achieve a "full system backup" of your fully configured sme server is to use software RAID1 with two drives & swap out one of the RAID drives.
You need a third drive of identical size to those in your sme server RAID1 array. Shutdown the system and physically remove one of the drives.
Reconnect a clean drive and rebuild the array (menu selectable).
In the event of a major disk failure this "spare drive with data on it" can be connected to the system (as a single drive in degraded RAID mode) and you can start up the system using only this drive. Then you can shutdown and connect a second clean (identically sized drive) and rebuild the array (selectable from the console menu when you log in as admin).
This usually take a couple of hours to rebuild but the sme server is usable the whole time.
If you want to increase the size of your drive, see the restore from disk procedure that is explained in the sticky post re upgrading from sme6 to sme7.
http://forums.contribs.org/index.php?topic=30745.0The same concept applies to upgrades/restores from sme7 to sme7 from smaller to larger disks.
You can't add a larger drive to a smaller drive in RAID1 array. The array will be created to the size of the smaller drive.
If you want to increase the disk size the simplest approach is backup, rebuild server with larger drive(s) preferably in software RAID1, install clean OS, restore, install contribs.
Note the restore can be done by using one of the backup contribs (backup2 or backupdar from Darrell May) & then restore.
You can save some backup time by using the restore from disk routine, its the same thing but just bypasses the backup step.
Follow the steps in the link provided.
You will need to reinstall contribs after any restore is complete but any reconfiguration should be minimal as the contribs will see & use the restored config files and databases & mysql dbs.
Then when your server is fully rebuilt with larger drives in software RAID1, you can remove one of the drives, replace it with a empty partitionless drive of the identical size, and select the option to rebuild the array from the admin console menu.
Always issue the command
cat /proc/mdstat
to check the array is fully synchronised before removing a drive.
Always erase partitions and data from a drive before you add it to an array, it must be totally EMPTY & partitionless. You can issue commands in Linux to erase the disk
eg (replacing hda & hdc with the correct details ie sda sdb as applicable)
dd if=/dev/zero of=/dev/hda
dd if=/dev/zero of=/dev/hdc
or use the Delpart.exe utility on a floppy or CD boot disk, search Internet for it. You would do this in a different box before doing the swap.
The drive to be removed (swapped) would ideally be mounted in a removable front panel caddie to allow easy regular swapping without opening the box. Get a good brand of caddie to ensure the little fans inside keep working after a few years.
I would still run regular full backups using backup2 or backupdar as these backup your system in between disk swaps, so you have the best of both worlds. You can quickly be up and running to the last good disk swap (although the data may be old), and then rebuild a machine at a more leisurely pace using restore from the backup & reinstall contribs, or otherwise just selectively restore data to your swapped in drive. It depends on your circumstances, and most likely which way will bring about the quickest resolution of your disk failure problem.
Now go back to the beginning of this post and read it all again SLOWLY.