Changes

From SME Server
Jump to navigationJump to search
7,560 bytes removed ,  03:08, 27 November 2008
outdated info removed
Line 1: Line 1:  
== Backup with dar using e-smith-backup ==
 
== Backup with dar using e-smith-backup ==
{{Outdated}}
  −
{{Level|medium}}
  −
  −
===Overview===
  −
{{Warning box|Please be aware this method is under testing and final review.}}
  −
  −
This rpm has moved from being a contrib, to testing stage for inclusion in the base install.
  −
The latest version of the rpm can be found in the smeupdates-testing repository, the current version (at 6 November 2008) is e-smith-backup-2.0.0-17.el4.sme.noarch.rpm, although this may change due to bug fixes and improvements.
  −
Please report any bugs to bugzilla, http://bugs.contribs.org/
     −
 
+
[http://dar.linux.free.fr/ DAR homepage]
This contrib will only run on sme7.2 or more recent versions and is a replacement for the standard e-smith-backup rpm, and adds extra settings to the standard server manager backup or restore panel.
  −
It can be configured to do daily full or incremental backup to a smbfs/cifs/nfs share on a LAN workstation or to a local USB disk.
  −
An email notification will be sent to admin when the backup job finishes.
  −
This contrib uses dar to perform backups, so you need to install the dar & libdar rpm's as well,  available from the smecontribs repo.
  −
 
  −
===Installation===
  −
 
  −
yum --enablerepo=smetest --enablerepo=smeupdates-testing --enablerepo=smecontribs update e-smith-backup
  −
 
  −
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 the smetest repo & follow the install instructions above.
      
===Detailed Information===
 
===Detailed Information===
      
====What is e-smith-backup with dar ?====
 
====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.
+
e-smith-backup with dar is an upgrade of e-smith-backup sme core rpm which provides panels for daily full or incremental backup on LAN workstation (via nfs 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 new functions provided ?====
 
  −
 
  −
====Are other new functions provided ?====
      
Yes. Aside use of session timeout, the first is incremental backup.
 
Yes. Aside use of session timeout, the first is incremental backup.
Line 83: Line 16:  
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 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.  
+
The third function is selective restore of any saved file or directory, exactly as it was for any of the saved days in your sets. Not only you can restore a lost file at it's 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===
 
===Practical setup tips===
Line 140: Line 64:  
Enter the following (using your share name, user, pasword & domain)
 
Enter the following (using your share name, user, pasword & domain)
 
  umount /mnt/smb
 
  umount /mnt/smb
  /bin/mount -t smbfs //stationXX/bkp1 /mnt/smb -o username=XXXXXX,password=XXXXXXXXXXXXX
+
  /bin/mount -t cifs //stationXX/bkp1 /mnt/smb -o username=XXXXXX,password=XXXXXXXXXXXXX
 
  rm -f -R /mnt/smb/servername.yourdomain.com/
 
  rm -f -R /mnt/smb/servername.yourdomain.com/
 
  rm -f -R /mnt/smb/tmp_dir/
 
  rm -f -R /mnt/smb/tmp_dir/
Line 160: Line 84:  
  Ctrl o
 
  Ctrl o
 
  Ctrl x
 
  Ctrl x
  −
Restart crond so the new cron job takes effect
  −
/etc/init.d/crond restart
        Line 226: Line 147:  
It is also prudent to do a test full restore and verify that /opt (& all other backed up directories & files) are restored, as anticipated.
 
It is also prudent to do a test full restore and verify that /opt (& all other backed up directories & files) are restored, as anticipated.
 
If something is wrong with your backup or restore procedures, then required files may not be backed up and restored, so it is wise to do a test full backup & restore to fully prove your procedures are working correctly.
 
If something is wrong with your backup or restore procedures, then required files may not be backed up and restored, so it is wise to do a test full backup & restore to fully prove your procedures are working correctly.
  −
===Removal/uninstall information===
  −
  −
The base sme server code is in the modified e-smith-backup rpm, so no changes are made to the standard core functionality of the sme server backup routines. The modified rpm can be left installed, just do not use any of the additional functionality.
  −
  −
To fully remove the rpm & configuration from your system and reinstall the base rpm do the following steps. Check the current version of e-smith-backup (in the smeos repository location listed below) and replace the code appropriately.
  −
  −
rpm -e --nodeps e-smith-backup
  −
mkdir -p /newfolder
  −
wget http://mirror.contribs.org/smeserver/releases/7/smeos/i386/SME/RPMS/e-smith-backup-1.14.0-16.el4.sme.noarch.rpm
  −
yum localinstall e-smith-backup*.rpm
  −
signal-event post-upgrade
  −
reboot
  −
  −
Check for any orphaned cron jobs & delete them if necessary
  −
rm /etc/cron.d/backupwk
  −
  −
Remove the Exclude entry for e-smith-backup from the smeupdates repository (made during install)
  −
db yum_repositories delprop smeupdates Exclude
  −
signal-event yum-modify
  −
  −
The standard Software installer panel/yum update process will now automatically update e-smith-backup if a new version is released.
  −
  −
  −
Check the versions of rpms installed (& if installed) with
  −
rpm -qa dar
  −
rpm -qa libdar
  −
rpm -qa e-smith-backup
  −
  −
===References===
  −
  −
http://forums.contribs.org/index.php?topic=37922.0
  −
  −
http://forums.contribs.org/index.php?topic=33762.msg144342#msg144342
  −
  −
[[bugzilla:1880]]
  −
  −
[http://dar.linux.free.fr/ DAR homepage]
      
----
 
----
 
[[Category:Contrib]]
 
[[Category:Contrib]]
 
[[Category: Backup]]
 
[[Category: Backup]]

Navigation menu