Line 4: |
Line 4: |
| | | |
| [http://dar.linux.free.fr/ DAR homepage] | | [http://dar.linux.free.fr/ DAR homepage] |
| + | |
| + | {{Note box|'''Important''' - Be aware of the concepts and issues as described in this section https://wiki.contribs.org/Backup_server_config#Backup_and_Restore_concepts.2C_issues_and_other_information}} |
| | | |
| ===Typical scenarios=== | | ===Typical scenarios=== |
Line 127: |
Line 129: |
| each set". | | each set". |
| | | |
− | if you want a fixed number of increments in each set, then choose "Full backup
| + | If you want a fixed number of increments, less than a multiple of 7, in each set, then choose "Full backup |
− | is allowed on" = Anyday. | + | is allowed on" = Everyday. eg Daily backups in each set = 6 will result in 1 Full backup and 5 incremental backups, on each full backup all backups are deleted including the incrementals. |
| | | |
| | | |
Line 188: |
Line 190: |
| | | |
| Create the deletion script | | Create the deletion script |
− | pico -w /opt/scripts/deletebkp1 | + | nano -w /opt/scripts/deletebkp1 |
| | | |
| Enter the following (using your share name, user, pasword & domain) | | Enter the following (using your share name, user, pasword & domain) |
Line 202: |
Line 204: |
| | | |
| Create the cron job | | Create the cron job |
− | pico -w /etc/cron.d/deletebkp1 | + | nano -w /etc/cron.d/deletebkp1 |
| | | |
| Enter the following (setting the time & day to be just before your scheduled backup time), see below. | | Enter the following (setting the time & day to be just before your scheduled backup time), see below. |
Line 238: |
Line 240: |
| ===Adding/Excluding Directories and Files from the backup list=== | | ===Adding/Excluding Directories and Files from the backup list=== |
| | | |
− | {{Warning box|The e-smith-backup panel is designed to be used as a full disaster recovery backup & restore method for your sme server, and as such relies on the correct directories being included in the backup. Do not delete any of the default directories from 40go-into as these are all essential for a successful full Restore of your backup to a clean install of the sme server operating system (you will need to reinstall add on apps or contribs). You can safely add directories eg /opt, as indicated, but that should typically be the extent of changes made.}} | + | {{Warning box|The e-smith-backup panel is designed to be used as a full disaster recovery backup & restore method for your sme server, and as such relies on the correct directories being included in the backup. Do not delete any of the default directories from 40go-into as these are all essential for a successful full Restore of your backup to a clean install of the sme server operating system (you will need to reinstall add on apps or contribs). You can safely add directories eg /opt (without leading '/' ), as indicated, but that should typically be the extent of changes made.}} |
| ====Adding Files and Directories==== | | ====Adding Files and Directories==== |
| The default backup does not include /opt | | The default backup does not include /opt |
Line 247: |
Line 249: |
| mkdir -p /etc/e-smith/templates-custom/etc/dar/DailyBackup.dcf | | mkdir -p /etc/e-smith/templates-custom/etc/dar/DailyBackup.dcf |
| | | |
− | pico -w /etc/e-smith/templates-custom/etc/dar/DailyBackup.dcf/41go-into | + | nano -w /etc/e-smith/templates-custom/etc/dar/DailyBackup.dcf/41go-into |
| | | |
| --go-into opt | | --go-into opt |
Line 271: |
Line 273: |
| Create custom template fragment to exclude the unneeded files and directories | | Create custom template fragment to exclude the unneeded files and directories |
| mkdir -p /etc/e-smith/templates-custom/etc/dar/DailyBackup.dcf | | mkdir -p /etc/e-smith/templates-custom/etc/dar/DailyBackup.dcf |
− | pico -w /etc/e-smith/templates-custom/etc/dar/DailyBackup.dcf/45prune | + | nano -w /etc/e-smith/templates-custom/etc/dar/DailyBackup.dcf/45prune |
| | | |
| --prune home/e-smith/files/ibays/mirror/cgi-bin | | --prune home/e-smith/files/ibays/mirror/cgi-bin |
Line 326: |
Line 328: |
| === Backup file slices are NOT autonomous === | | === Backup file slices are NOT autonomous === |
| The catalogue of the contents of the backup is put in the last slice. If for some reason the last slice can not be written (e.g. backup medium is full or network failure), is lost or corrupt, the slices already saved are useless. | | The catalogue of the contents of the backup is put in the last slice. If for some reason the last slice can not be written (e.g. backup medium is full or network failure), is lost or corrupt, the slices already saved are useless. |
− |
| |
− | === NFS ===
| |
− |
| |
− | 27/06/2012 - With the current version of SME Version 8 and 9 it would appear that NFS is not installed by default.
| |
− |
| |
− | To enable backup via nfs you will need to install nfs-utils from base :
| |
− |
| |
− | yum install nfs-utils
| |
− |
| |
− | For further information please see this bug http://bugs.contribs.org/show_bug.cgi?id=7006
| |
| | | |
| === Naming of the backups on the workstation share or USB disk === | | === Naming of the backups on the workstation share or USB disk === |
Line 392: |
Line 384: |
| First, MOUNT THE BACKUP DRIVE (if required): | | First, MOUNT THE BACKUP DRIVE (if required): |
| mount /dev/sdc1 /media/BackupDrive1/ | | mount /dev/sdc1 /media/BackupDrive1/ |
| + | |
| + | You can mount the configured CIFS/SMB destination using<syntaxhighlight lang="bash" > |
| + | mount -t cifs //$(config getprop backupwk SmbHost)/$(config getprop backupwk SmbShare) $(config getprop backupwk Mount) -o credentials=/etc/dar/CIFScredentials |
| + | </syntaxhighlight>List available backups<syntaxhighlight lang="bash" > |
| + | find $(config getprop backupwk Mount)/$(config get SystemName).$(config get DomainName) -name "*.1.dar" | sed s/\.1\.dar$// |
| + | </syntaxhighlight> |
| | | |
| Then, RESTORE THE DIRECTORY: | | Then, RESTORE THE DIRECTORY: |
− | dar -x /media/BackupDrive1/server.domain.local/set2/full-201408092200 -N -R / -w -g home/e-smith/files/ibays/share_data/files | + | dar -x /media/BackupDrive1/server.domain.local/set2/full-201408092200 -N -R ./ -w -g home/e-smith/files/ibays/share_data/files |
| + | |
| + | This will restore the directory /home/e-smith/files/ibays/share_data/files to you current directory. If your current directory is /tmp/, the files will be recovered to /tmp/home/e-smith/files/ibays/share_data/files. This will make you able to search through the recovered files and, if needed, move them to their proper location. |
| + | |
| + | {{Warning box|Be sure to use -R ./ (the dot) to restore in the current dir, otherwise you'll restore files/dirs in their original path}} |
| | | |
| You may also have to RESTORE ANY INCREMENTS: | | You may also have to RESTORE ANY INCREMENTS: |
− | dar -x /media/BackupDrive1/server.domain.local/set2/inc-001-201408102200.1.dar -N -R / -w -g home/e-smith/files/ibays/share_data/files | + | dar -x /media/BackupDrive1/server.domain.local/set2/inc-001-201408102200.1.dar -N -R ./ -w -g home/e-smith/files/ibays/share_data/files |
− | dar -x /media/BackupDrive1/server.domain.local/set2/inc-002-201408112200.1.dar -N -R / -w -g home/e-smith/files/ibays/share_data/files | + | dar -x /media/BackupDrive1/server.domain.local/set2/inc-002-201408112200.1.dar -N -R ./ -w -g home/e-smith/files/ibays/share_data/files |
− | dar -x /media/BackupDrive1/server.domain.local/set2/inc-003-201408122200.1.dar -N -R / -w -g home/e-smith/files/ibays/share_data/files | + | dar -x /media/BackupDrive1/server.domain.local/set2/inc-003-201408122200.1.dar -N -R ./ -w -g home/e-smith/files/ibays/share_data/files |
− | dar -x /media/BackupDrive1/server.domain.local/set2/inc-004-201408132200.1.dar -N -R / -w -g home/e-smith/files/ibays/share_data/files | + | dar -x /media/BackupDrive1/server.domain.local/set2/inc-004-201408132200.1.dar -N -R ./ -w -g home/e-smith/files/ibays/share_data/files |
| | | |
| + | {{Note box|Unmount the backup destination after any manual exploration: |
| + | umount $(config getprop backupwk Mount)}} |
| | | |
| ---- | | ---- |
− | [[Category:Contrib]]
| + | |
| [[Category: Backup]] | | [[Category: Backup]] |
| + | [[Category: Howto]] |