Line 273: |
Line 273: |
| '''Note 1:''' The default values shown in this table are the Affa program defaults and not to be confused with the preset values in the job configuration files, e.g. backup-smeserver.conf. | | '''Note 1:''' The default values shown in this table are the Affa program defaults and not to be confused with the preset values in the job configuration files, e.g. backup-smeserver.conf. |
| | | |
− | '''Note 2:''' Affa 3 for SME is a fork of [http://affa.sourceforge.net/ Affa 3 for CentOS]. It adds a few options back again which have been removed. Generally the configuration properties as described [http://wiki.nikoforge.org/Affa_Configuration/ here] do apply. stephdl added the following functions for SME: | + | '''Note 2:''' The complete documentation of the settings of Affa3 is available in [http://affa.sourceforge.net/AffaPdfMan.pdf] . It should be taken in consideration! |
| + | |
| + | '''Note 3:''' Affa 3 for SME is a fork of [http://affa.sourceforge.net/ Affa 3 for CentOS]. It adds a few options back again which have been removed. Generally the configuration properties as described [http://wiki.nikoforge.org/Affa_Configuration/ here] do apply. Arnaud added the following functions for SME: |
| <ul> | | <ul> |
| <li>The parameter “SMEServer”</li> | | <li>The parameter “SMEServer”</li> |
Line 280: |
Line 282: |
| <li>The functions “--rise” and “--undo-rise”</li> | | <li>The functions “--rise” and “--undo-rise”</li> |
| </ul> | | </ul> |
− | Consequently the list below should reproduce the list for the unforked Affa 3 version, plus adding the properties above. For details refer to [https://www.guedel.eu/index.php/informatique/sme-server-8/affa-v3 stephdl's website]. | + | Consequently the list below should reproduce the list for the unforked Affa 3 version, plus adding the properties above. For details refer to [https://www.guedel.eu/index.php/informatique/sme-server-8/affa-v3 Arnaud's website]. |
| {| border="1" cellpadding="3" cellspacing=0 | | {| border="1" cellpadding="3" cellspacing=0 |
| |- | | |- |
Line 874: |
Line 876: |
| With option --all, all files and directories of the archive as defined by the include[] properties are restored. Files or directories with the same name on the Affa server will be overwritten and cannot be restored by a undorise. This should not be an issue on a dedicated Affa server which does not hold any other data. After a possible undorise those additional restored data must be removed manually. | | With option --all, all files and directories of the archive as defined by the include[] properties are restored. Files or directories with the same name on the Affa server will be overwritten and cannot be restored by a undorise. This should not be an issue on a dedicated Affa server which does not hold any other data. After a possible undorise those additional restored data must be removed manually. |
| | | |
− | Please note, that the rise process backs up the the Affa server itself before doing the restore from the archive. This backup is used by a possible undorise run to restore the Affa server. Only the standard files and directories are backed up. Data in non-standard loctions (like /opt) are untouched and will still exist after the rise run. | + | Please note, that the rise process backs up the the Affa server itself before doing the restore from the archive. This backup is used by a possible undorise run to restore the Affa server. Only the standard files and directories are backed up. Data in non-standard loctions (like /opt) are untouched and will still exist after the rise run '''if they don't get overwritten by data of the backup''' (=if the backup contains /opt too e.g.). |
| | | |
| {{Note box|The above command is not implemented in Affa 3 for CentOS. It has been specifically added to the fork for SME.}} | | {{Note box|The above command is not implemented in Affa 3 for CentOS. It has been specifically added to the fork for SME.}} |
| | | |
| '''affa --undo-rise''' | | '''affa --undo-rise''' |
− | This feature reverts a risen Affa box to a backup server. After a reboot, all configured jobs will work again. | + | This feature reverts a risen Affa box to a backup server. After a reboot, all configured jobs '''based on standard files and directories''' will work again. |
| | | |
| {{Note box|The above command is not implemented in Affa 3 for CentOS. It has been specifically added to the fork for SME.}} | | {{Note box|The above command is not implemented in Affa 3 for CentOS. It has been specifically added to the fork for SME.}} |
Line 979: |
Line 981: |
| You want to run backups on 11:30 h, 15:30 h and 19:30 h and you want to keep the last 3 scheduled backups, 7 daily, 5 weekly, 12 monthly and 1 yearly backups. | | You want to run backups on 11:30 h, 15:30 h and 19:30 h and you want to keep the last 3 scheduled backups, 7 daily, 5 weekly, 12 monthly and 1 yearly backups. |
| * log into the 'prodbox' and install the Affa packages as described above. | | * log into the 'prodbox' and install the Affa packages as described above. |
− | * copy the config helper script sample | + | * create/edit the conf file of the job: nano /etc/affa/JOBNAME.conf |
− | cp /usr/lib/affa/jobconfig-sample.pl /root/prodbox-job.pl
| + | and set: |
− | * edit /root/prodbox-job.pl and set
| + | remoteHostName=localhost |
− | my $jobname='prodbox'; | + | TimeSchedule=1130 |
− | and
| + | TimeSchedule=1530 |
− | 'remoteHostName‘=>'localhost', | + | TimeSchedule=1930 |
− | 'TimeSchedule'=>'1130,1530,1930', | + | scheduledKeep=3 |
− | 'scheduledKeep'=>3, | + | dailyKeep=7 |
− | 'dailyKeep'=>7, | + | weeklyKeep=5 |
− | 'weeklyKeep'=>5, | + | monthlyKeep=12 |
− | 'monthlyKeep'=>12, | + | yearlyKeep=1 |
− | 'yearlyKeep'=>1, | + | RootDir=/mnt/affadevice |
− | 'RootDir=>'/mnt/affadevice', | |
| Review the other properties and change them to your needs. | | Review the other properties and change them to your needs. |
− | * write the configuration
| |
− | /root/prodbox-job.pl
| |
| * run the job manually | | * run the job manually |
− |
| |
| affa --run prodbox | | affa --run prodbox |
| | | |
Line 1,007: |
Line 1,005: |
| | | |
| In the NAS example set | | In the NAS example set |
− | 'AutomountDevice=>'10.200.48.2:/mnt/affashare', | + | AutomountDevice=10.200.48.2:/mnt/affashare |
− | 'AutomountPoint =>'/mnt/affadevice', | + | AutomountPoint=/mnt/affadevice |
| and skip the step 2. | | and skip the step 2. |
| | | |
| In the USB drive example set | | In the USB drive example set |
− | 'AutomountDevice=>'/dev/sdc1', | + | AutomountDevice=/dev/sdc1 |
− | 'AutomountPoint =>'/mnt/affadevice', | + | AutomountPoint=/mnt/affadevice |
| and skip the steps 5 to 8. | | and skip the steps 5 to 8. |
| | | |
Line 1,062: |
Line 1,060: |
| | | |
| ==== Full restore ==== | | ==== Full restore ==== |
− | To run a full restore of user and configuration data, run on the Affa server
| + | Generally: |
− | affa --full-restore <JOB> [<ARCHIVE>] | + | '''affa --full-restore [optional settings] JOB [ARCHIVE]''' |
− | This rsyncs the data from the backup ARCHIVE back to the 'remoteHostname' defined in the configuration of the job JOB. | + | This rsyncs the data (files and directories )from the backup ARCHIVE back to the 'remoteHostname' defined in the configuration of the job JOB. |
| + | If ARCHIVE is not given, the archive 'scheduled.0' is used as the default. |
| + | The --full-restore reconstructs the server as it was at the time of the backup and takes following IMPORTANT optional settings in consideration: |
| + | |
| + | With option [--preserve-newer=yes] files on the remote server with modification time newer than on the backup are not overwritten. |
| + | |
| + | With option [--delete=yes] all files on the remote server, which are not in the backup, are deleted. |
| + | |
| + | If the parameter “SMEServer=yes” is set, the signal-event pre-restore and signal-event post-upgrade will be used automatically. |
| + | |
| + | After the restore is done, the restored server reboots automatically. |
| | | |
| Example: | | Example: |
− | You have backuped your production server 'prodsrv' as job 'prodbox'. To restore from the latest backup run | + | You have backuped your production server 'prodsrv' as job 'prodbox'. To restore only lost data from the latest backup run |
| affa --full-restore prodbox | | affa --full-restore prodbox |
| | | |
− | To restore from the older archive daily.3 run | + | To restore exactly from the older archive daily.3 run |
− | affa --full-restore prodbox daily.3 | + | affa --full-restore [--preserve-newer=no] [--delete=yes] prodbox daily.3 |
| | | |
− | {{Warning box| A full restore reconstructs the server as it was at the time of the backup. That means, that all files created or server configuration changes made after the backup will be lost. After the restore is done, the restored server reboots automatically. }} | + | {{Warning box| A full restore [--preserve-newer=no] [--delete=yes] reconstructs the server as it was at the time of the backup. That means, that all files created or server configuration changes made after the backup will be lost! }} |
| | | |
| ==== Moving a SME server installation to new hardware using the Affa rise feature ==== | | ==== Moving a SME server installation to new hardware using the Affa rise feature ==== |
Line 1,095: |
Line 1,103: |
| | | |
| With SMEServer=yes the SME default backup list. | | With SMEServer=yes the SME default backup list. |
| + | |
| + | {{Note box|The list must be added!}} |
| | | |
| | | |