Backup with dar

From SME Server
Revision as of 14:03, 1 September 2007 by RayMitchell (talk | contribs) (changed rpm install order)
Jump to navigation Jump to search

Backup with dar using e-smith-backup

Overview

This contrib requires sme7.2. It is a replacement for the standard e-smith-backup rpm, and adds extra settings to the standard server manager backup or restore panel. This contrib uses dar to perform backups, so you need to install the dar rpm as well.


Installation

Change (cd) to to a empty folder and do:

wget http://mirror.contribs.org/smeserver/contribs/dmay/smeserver/7.x/dar-2.3.2-1.i386.rpm
wget http://beta.free-eos.org/sme/RPMS/e-smith-backup-1.14.0-16eos1.el4.sme.noarch.rpm 
yum localinstall dar
yum localinstall e-smith-backup

To prevent updates from overwriting the modified rpm do:

echo e-smith-backup > /etc/e-smith/db/yum_repositories/defaults/smeupdates/Exclude
/etc/e-smith/events/actions/initialize-default-databases
expand-template /etc/yum.conf

Future updates to this rpm will need to be done manually.


Open server manager & select the Backup or restore panel Click on the the pull down menu for Select an action and you will see extra choices which have been added ie

Configure workstation backup

Verify workstation backup

Restore from workstation

Selective file restore from workstation

Select "Configure workstation backup" and configure it. Further information is in the Detailed Information section below.

Manual upgrade information

Note that the commands issued earlier prevent the modified e-smith-backup (with dar) rpm from being replaced by normal upgrades done using either the software installer panel or yum update.

When changes to the base sme server e-smith-backup rpm occur, an updated modified version of the e-smith-backup with dar rpm will be released and users will need to manually update it. Download the new modified version of e-smith-backup from beta.free-eos.org & follow the install instructions above.


Detailed Information

What is e-smith-backup with dar ?

e-smith-backup with dar is an upgrade of current e-smith-backup sme core rpm which provides panels for daily full or incremental backup on LAN workstation (via nfs, smbfs or cifs) or local usb disk, and full or selective restore with use of dar program.


What provides e-smith-backup with dar ?

e-smith-backup with dar completes core e-smith-backup with four panels :

- configure daily full or incremental backup to smbfs/cifs/nfs share on a LAN workstation or on local usb disk - verify backup on LAN workstation or local usb disk - restore full backup from LAN workstation or local usb disk - selective restore of files or directories from LAN workstation or local usb disk

New backup options are provided with additional perl functions included in backup panel script, a new perl backup script /etc/e-smith/events/actions/workstation-backup-dar, and a new backupwk record in configuration db. All are written with the same logic as present backup scripts.


What are specific problems of SME Server LAN backups managed by e-smith with dar ?

With experience of more than four years backuping sme servers with dar on LAN workstations (in production environments) the most important of encountered problems is that, when the backup session is started, you cannot rely upon a perfect working of the LAN or the distant workstation. Inevitably, one day the LAN is too busy and/or the connection to the distant share hacks. After the failure sme may keep zombies backup or mount processes, and with some contribs you can be left with incomplete or buggy backup until hopped next good daily backup. These problems are problems of real world with LAN, that backup scripts must take into account.

Another common problem with backup through a LAN is that your lan disponibility for backup flow is not 24/24, but more probably something like "only from 20h to 6h, except on sunday where nobody works on the LAN..." So in case of large volume of data to backup, beeing able to backup all the datas during the week-end and doing only incremental backup on the week days really makes sense.

All these problems are considered with e-smith-backup with dar. Scripts verify the absence of old share mounts, and alert admin about such situation. Test is made that the distant backup share is available and writable. Of course with daily backup a maximum backup session time of only 24 h is available, but if this limit occurs e-smith-backup with dar cleanly stops the backup session (maybe all is ok and the backup has not enough time to complete), the lan share is unmounted, and daily process can restart anyway. If you have enabled incremental backup and the last backup (full or incremental) was not completed because of a timeout, the backup can then safely restart and complete in an incremental way.

The admin can also set a timeout limit which keeps the session inside a specified number of hours, excluding traffic of LAN backup sessions when users work on the LAN.

Admin user can also set backup configuration so that this time limit occurs only on incremental backup sets. Then if you have a lot of data and your full backup time exceeds time of LAN inactivity, you can always backup all your data each end of week and preserve LAN bandwith for users. If you program a full backup on saturday night, you get 24 hours to do full backup and even if the full backup time exceeds 24 hours, the first incremental backup on sunday night will backup remaining data. You begin your week with full data saved, and incremental backup session time is limited to 6 or 8 hours during week days.

Full backup sessions can also be allowed on every day, or limited to a specific day of week.


Are other new functions provided ?

Yes. Aside use of session timeout, the first is incremental backup. This means that you can backup and restore data for the period of time you want : one day, three days, one week, one month, 100 days... and restore your system at any state it was during this period of time. This probably has no utility to do full restore of the system as it was one month ago, but restoring a file lost by a user two or three weeks ago can be useful. And restoring a safe system more than one day old can be needed.

The second function is keeping more than one set of backup (a set is full backup data and all datas of next daily incremental backups) with automatic rotation. e.g. you can do only nightly full backups but keep three sets of backup for security reason (as being able to restore the system as it was 72h ago).

The third function is selective restore of any backuped file or directory, exactly as it was for any of the backuped days in your sets. Not only you can restore a lost file at his last state, but also say : make restore of the most recent version of the file before this given date... Selective restore is not an easy thing to manage by hand, and providing this in a simple way with panels is useful. Dar permits to manage selective restore and e-smith-backup with dar panels tries to keep this function as simple as possible to use.


I read about problems about smbfs or cifs support with sme, and nfs packages are not on my sme...

Before sme 7.2, smb and kernel versions of sme have bugs in smb mount and cifs support. For smb mount bug, e-smith-backup with dar includes necessary work-around. For cifs support, corrected 2.6.9-55 kernel is packaged with sme 7.2. For nfs support, e-smith-backup doesn't need install of any nfs package on the sme server (not even portmap).


Practical setup tips

If you set the system to create 4 backup sets with 7 dailys per set with Friday set as the only full day, this will result in 4 sets of 7 files with one large file per set being the Friday full and the rest being daily incrementals.


Reference: http://forums.contribs.org/index.php?topic=37922.0