DAR2

From SME Server
Revision as of 04:05, 20 August 2022 by Unnilennium (talk | contribs) (→‎Installation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search


PythonIcon.png Skill level: Easy
The instructions on this page can be followed by a beginner.


Maintainer

Darrel May (Contrib)

Version

Alpha 10:
smeserver-dar2
The latest version of smeserver-dar2 is available in the SME repository, click on the version number(s) for more information.


stephdl

Description

This contrib uses dar (http://dar.linux.free.fr) to create a feature rich backup system for smeserver 7.x. It adds a server-manager panel (Backup > Disk ARchive) to define, schedule and launch server backups and restores, including full disaster recovery, to and from network shares or an attached local disk. The destination network share can be any accessible network mapped drive. Another server, pc workstation or network attached hard drive. The destination local disk can be any mountable hard disk. IDE/SCSI/SATA/USB. In addition an unlimited number of custom backups may be scheduled.

Installation

Important.png Note:
work in porgress, for testing purpose only

To install this contribs issue the following command on the SME Server shell:

yum install smeserver-dar2 --enablerepo=smecontribs,smedev,smetest,epel

You have to enable the stephdl repository. see bugzilla:8508

yum install smeserver-dar2 --enablerepo=stephdl
signal-event post-upgrade;signal-event reboot

To install this contribs issue the following command on the SME Server shell:

yum install smeserver-dar2 --enablerepo=smecontribs
signal-event post-upgrade;signal-event reboot

Usage

The contrib adds a server-manager panel labeled 'Backup > Disk ARchive'. All backup and restore operations may be performed using this panel. Usage instructions are detailed in the panel text.

Additional information

The dar utility is available for a number of platforms, including Windows. The Windows Version is command-line only, with no graphical view of files for restoring. A graphical interface (kdar) is available for Linux platforms.

Sample e-mail sent after scheduled backup job completes

Date: 10 Jun 2008 04:30:06 -0000
From: Cron Daemon <root@domain.com>
Subject: Cron <root@sme> /etc/e-smith/events/actions/dar2-backup 911
To: root@domain.com
Connecting /mnt/dar2/911 to //station1/dar2
Expanding /etc/dar2/911 template
Creating /mnt/dar2/911/sme.myezserver.com/911/db.zip
Expiring old backups
Executing pre-backup event
Verbose logging is off
Performing 911 backup
No terminal found for user interaction. All questions will be assumed 
a negative answer (less destructive choice), which most of the time will abort the program.
--------------------------------------------
47707 inode(s) saved
with 4 hard link(s) recorded
0 inode(s) changed at the moment of the backup
0 inode(s) not saved (no inode/file change)
0 inode(s) failed to save (filesystem error)
259 inode(s) ignored (excluded by filters)
0 inode(s) recorded as deleted from reference backup
 --------------------------------------------
Total number of inode considered: 47966
--------------------------------------------
Listing 911 archives on target:
total 9331906
-rwxr-xr-x  1 root root 681574400 Jun  6 23:44 2008.06.06.1.dar
-rwxr-xr-x  1 root root 681574400 Jun  7 00:00 2008.06.06.2.dar
-rwxr-xr-x  1 root root 681574400 Jun  7 00:16 2008.06.06.3.dar
-rwxr-xr-x  1 root root 343344717 Jun  7 00:24 2008.06.06.4.dar
-rwxr-xr-x  1 root root 681574400 Jun  7 23:44 2008.06.07.1.dar
-rwxr-xr-x  1 root root 681574400 Jun  8 00:00 2008.06.07.2.dar
-rwxr-xr-x  1 root root 681574400 Jun  8 00:16 2008.06.07.3.dar
-rwxr-xr-x  1 root root 343679423 Jun  8 00:25 2008.06.07.4.dar
-rwxr-xr-x  1 root root 681574400 Jun  8 23:45 2008.06.08.1.dar
-rwxr-xr-x  1 root root 681574400 Jun  9 00:00 2008.06.08.2.dar
-rwxr-xr-x  1 root root 681574400 Jun  9 00:18 2008.06.08.3.dar
-rwxr-xr-x  1 root root 344188465 Jun  9 00:26 2008.06.08.4.dar
-rwxr-xr-x  1 root root 681574400 Jun  9 23:44 2008.06.09.1.dar
-rwxr-xr-x  1 root root 681574400 Jun 10 00:01 2008.06.09.2.dar
-rwxr-xr-x  1 root root 681574400 Jun 10 00:16 2008.06.09.3.dar
-rwxr-xr-x  1 root root 345723391 Jun 10 00:25 2008.06.09.4.dar
-rwxr-xr-x  1 root root     41253 Jun  9 23:30 db.zip
Total target disk space usage:
Filesystem            Size  Used Avail Use% Mounted on
//station1/dar2        18G  8.6G  9.2G  49% /mnt/dar2/911
Executing post-backup event
Dismounting /mnt/dar2/911
Mon Jun  9 23:30:02 CDT 2008 - backup started
Tue Jun 10 00:25:49 CDT 2008 - backup finished

Midnight Commander (MC) dar-extension

With the installation of DAR2 comes an extension for viewing .dar files from within Midnight Commander but it is not installed by default. You can find the files extracted in the /opt/dar2-mc directory. For installation of this extension run the install.sh shell script with:

cd /opt/dar2-mc
./install.sh

DAR2 command line scripts

Located in /etc/e-smith/events/actions/

dar2-backup = script that performs backup
dar2-dr-restore = script that performs a complete disaster recovery restore
dar2-mc = script that launches Midnight Commander and provides access to your archives
dar2-restore = script that performs restore

Manual restore of DAR2 configuration

It is possible to selectively restore the DAR2 configuration (backup job settings etc) from a full system backup. Firstly install the DAR2 contrib on a new server, which will of course have no backup jobs configured.

Then look at the backup file in the backup target location and find a file called db.zip. Extract the dar2 db file and copy it to /home/e-smith/db on the new server, to restore the previous DAR2 configuration.

Known issue

Cifs Error

When using the included backup functionality, or the DAR2 contrib, backing up to a windows remote share generates the following cifs errors. see bugzilla:7341

Feb 12 11:51:25 sme e-smith-bg: Connecting /mnt/dar2/backup to \\192.168.10.30\bkp
Feb 12 11:51:25 sme kernel:  CIFS VFS: Send error in SessSetup = -12
Feb 12 11:51:25 sme kernel:  CIFS VFS: cifs_mount failed w/return code = -12
Feb 12 11:51:25 sme e-smith-bg: mount error(12): Cannot allocate memory
Feb 12 11:51:25 sme e-smith-bg: Refer to the mount.cifs

The solution could be to modify the windows registry by the file below

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management]
"LargeSystemCache"=dword:00000001
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\LanmanServer\Parameters]
"Size"=dword:00000003

Save the content above in a file with the name W7-backup.reg and import it in the windows registry, restart the service or the Windows computer

Bugs

Please raise bugs under the SME-Contribs section in dar2 and select the smeserver-dar2 component or use this link .


IDProductVersionStatusSummary (21 tasks)
12161SME Contribs10.0UNCONFIRMEDsmeserver-dar2 not found when following the SME10 instructions
12153SME Contribs10.0CONFIRMEDInitial Import in SME 10 [smeserver-dar2]
8519SME Contribs9betaCONFIRMEDunknown filesystem type 'smbfs'
7052SME Contribs8.0UNCONFIRMEDCannot find backup directory when restoring to a new disk
6947SME Contribs8.0UNCONFIRMEDDAR2 contrib dar2-mc plugin does not allow midnight commander to browse dar files
6497SME Contribs8.0CONFIRMEDDar backups broken - Badly formatted terminator, cannot extract catalogue location
6261SME Contribs7.5CONFIRMEDDAR2 causes server reboot/failure
5950SME Contribs7.4CONFIRMEDDAR2 will not backup, cannot write to file system.
5677SME Contribs7.4CONFIRMEDDar2 Zip file creation errors
5592SME Contribs7.4CONFIRMEDRestore fails with "Badly formatted terminator, cannot extract catalogue location"
5264SME Contribs7.4CONFIRMEDDAR2 says it only supports cifs, smbfs, and ext3, but vfat works fine
5263SME Contribs7.4CONFIRMEDDAR2 doesn't handle spaces in the 'Job Name' field, but doesn't validate for this.
4857SME Contribs7.4CONFIRMEDDAR2 stopped working
4843SME Contribs7.4CONFIRMEDBackup with dar keeps repeating same incremental backup
4838SME Contribs7.4CONFIRMEDNFR: Auto dismount after backup configurable
3680SME Contribs7.2CONFIRMEDDAR2 translation
3541SME Contribs7.2CONFIRMEDerratic expiry of old backups using usbdisk (ext3)
3361SME Contribs7.2CONFIRMEDKernal Panic Lockup (DAR Related??)
3323SME Contribs7.2CONFIRMEDRestore script does not check error return from $DAR
3162SME Contribs7.1CONFIRMEDdar2 backup fills the messages log
2433SME Contribs7.1CONFIRMEDTranslation of header and link

Check installed version

yum info installed smeserver-dar2