Changes

Jump to navigation Jump to search
2,642 bytes added ,  13:01, 26 October 2014
Further rework to move instructions towards Affa 3.
Line 196: Line 196:  
  yum localinstall smeserver-affa-3.2.2.1-0.noarch.rpm --enablerepo=dag
 
  yum localinstall smeserver-affa-3.2.2.1-0.noarch.rpm --enablerepo=dag
 
<headertabs/>
 
<headertabs/>
Now manually create directory:
+
Now manually create directory for archive files:
 
  mkdir /var/affa
 
  mkdir /var/affa
   Line 280: Line 280:  
| none
 
| none
 
| FQHN or IP of the source host (mandatory)
 
| FQHN or IP of the source host (mandatory)
 +
|-
 +
| remoteUser
 +
| account
 +
| no
 +
| root
 +
| The user account to be used with all ssh logins. May be case sensitive, e.g. Administrator account on Windows
 +
|-
 +
| Description
 +
| text string
 +
| no
 +
| none
 +
| Any text that describes the job
 
|-
 
|-
 
| TimeSchedule  
 
| TimeSchedule  
| HHMM,HHMM,... || || doesn't need to be ordered. At least one time is mandatory. '''Important:''' Using the proper format HHMM is essential. Affa does not check it. Badly formatted TimeSchedule will cause strange Perl errors.  
+
| HHMM
 +
| yes
 +
| 2230
 +
| The time the job will run. Use exactly 4 digits, no colon, no point. '''Important:''' Using the proper format HHMM is essential. Badly formatted TimeSchedule will cause strange Perl errors.
 +
|-
 +
| status
 +
| enabled ''or'' disabled
 +
| no
 +
| enabled
 +
| When set to disabled, no cron entries will made. You can still run a job manually.
 +
|-
 +
| Include
 +
| full path
 +
| yes
 +
| none
 +
| File(s) or directory(s) to be included in the backup.  
 
|-
 
|-
| Description
+
| Exclude
| text string || ||  
+
| full path
 +
| yes
 +
| none
 +
| File(s) or directory(s) to be excluded from the backup.
 
|-
 
|-
 +
| RootDir
 +
| full path
 +
| no
 +
| /var/affa
 +
| where to store the backup archives. Do not use /home/e-smith or /root as these are included in the backup and therefore the rise option will not work! Recommended: /var/affa
 
| scheduledKeep
 
| scheduledKeep
| integer >= 1 || 1|| how many of the scheduled backups should be kept
+
| integer >= 1
 +
| no
 +
| 1
 +
| how many of the scheduled backups to be kept
 +
|-
 +
| dailyKeep
 +
| integer >= 0
 +
| no
 +
| 7
 +
| how many of the daily backups to be kept
 
|-
 
|-
| dailyKeep<br>weeklyKeep<br>monthlyKeep<br>yearlyKeep
+
| weeklyKeep
| integer >= 0 || 7<br>4<br>12<br>2<br>|| how many of the daily, weekly, monthly or yearly backups should be kept
+
| integer >= 0
 +
| no
 +
| 4
 +
| how many of the weekly backups to be kept
 
|-
 
|-
| SMEServer
+
| monthlyKeep
| yes ''or'' no || yes || when set to yes the default e-smith directories are automatically included and the property RPMCheck=yes can be used
+
| integer >= 0
 
+
| no
 +
| 12
 +
| how many of the monthly backups to be kept
 +
|-
 +
| yearlyKeep
 +
| integer >= 0
 +
| no
 +
| 2
 +
| how many of the yearly backups to be kept
 +
|-
 +
| EmailAddress
 +
| name@domain.com
 +
| yes
 +
| root
 +
| comma separated list of mail addresses, where the messages should be sent to<br>'''Note:''' By default Affa only sends messages on errors, never on success (see property chattyOnSuccess).
 +
|-
 +
| RetryAttempts
 +
| integer >= 0
 +
| no
 +
| 4
 +
| When set to a value>0, Affa re-run a failed job RetryAttempts times with a delay of RetryAfter seconds.
 +
|-
 +
| RetryAfter
 +
| seconds >= 0
 +
| no
 +
| 900
 +
| when set to a value>0, wait RetryAfter seconds before re-running the job after an error. Only applicable with RetryAttempts>0
 
|-
 
|-
| Include[0]<br>Include[1]<br>...
+
| RetryNotification
| full path || || additional files or directories to include
+
| yes ''or'' no
 +
| no
 +
| no
 +
| when set to no, Affa does not send an error message when a job has failed and RetryAttempts is configured. An error message is only sent when the last attempt has failed.
 +
| NRPEtrigger
 +
| hours
 +
| no
 +
| 24
 +
| NRPE reports a job as critical when the last successful run is older then NRPEtrigger hours. To exclude the job from monitoring set to a value < 0.
 
|-
 
|-
| Exclude[0]<br>Exclude[1]<br>...
+
| SambaShare
| full path || || additional files or directories exclude from backup
+
| yes ''or'' no
 +
| no
 +
| no
 +
| Access to the job archives via CIFS protocol.
 
|-
 
|-
| RPMCheck
+
| SambaValidUser
| yes ''or'' no || no || Only applicable to jobs that backups a SME 7 server.<br>Compares the packages installation of the source host with this affa backup host. Sends a message with diff list if not in sync. This check is usefull, if you want have the option to rise the backup server to a production server from a backup.
+
| local account
 +
| yes
 +
| affa
 +
| User who has permission to access the job archives via the CIFS protocol.
 
|-
 
|-
| DiskSpaceWarn
+
| preJobCommand, preJobCommandRemote
| strict ''or'' normal ''or'' risky ''or'' none || strict || run a disk space check after a job has been completed. With level 'strict' a warning message will be sent, if the available space is less then the size of the just completed backup. With level 'normal'/'risky' the message is sent, if less than 50%/10% of the backup size is still available.
+
| path relative to /etc/affa/scripts/
'''Note:''' When RootDir is a symbolic link to another filesystem the disk usage of the local filesystem rather than the linked filesystem is checked. Set the mountpoint as the RootDir to get correct checking.
+
| yes
 +
| none
 +
| Scripts to be executed before a job run. The job name and type (scheduled, daily etc.) are passed as arguments to the program. The preJobCommandRemote scripts are copied to the remote server and then executed there. The scripts are executed in alphabetical order. Use a numerical prefix if you need a specific order e.g. 01scriptB, 02remotescriptA, 03scriptA. Use the included prescript-sample.pl and prescriptRemote-sample.pl as a starting point for own scripts.
 
|-
 
|-
| localNice
+
| postJobCommand, postJobCommandRemote
| -19...+19 || 0 || run rsync local process niced.  
+
| path relative to /etc/affa/scripts/
 +
| yes
 +
| none
 +
| Scripts to be executed after a job run. The job name, the type (scheduled, daily etc.) and the exit code of the job run are passed as arguments to the program. The postJobCommandRemote scripts are copied to the remote server and then executed there. The scripts are executed in alphabetical order. Use a numerical prefix if you need a specific order e.g. 01scriptB, 02remotescriptA, 03scriptA. Use the included postscript-sample.pl and postscriptRemote-sample.pl as a starting point for own scripts.
 
|-
 
|-
| remoteNice
+
| dedup
| -19...+19 || 0 || run rsync process on source niced.  
+
| yes ''or'' no
 +
| no
 +
| no
 +
| The purpose of the deduplication is to remove duplicate files to save backup space. When set to 'yes' file deduplication is run after the synchronization has been completed. It looks for files that have identical content, user, group and permissions and replace duplicates by hardlinks. Deduplication scans the just completed archive and the previous one, that usually is
 +
scheduled.0 and daily.0 or scheduled.0 and scheduled.1. Consider this scenario: A user has renamed directories or files. Rsync sees those as new ones and copies them. Deduplication finds the identical copies in the previous archive and replace them by hardlinks. To use deduplication the Freedup program needs to be installed. Affa actually runs freedup -upg scheduled.0 <previous_archive>.
 
|-
 
|-
| Watchdog
+
| dedupKill
| yes ''or'' no || yes || Only applicable to jobs that backups a SME 7 server.<br>When a job is started, affa installs a watchdog script on the source in /etc/cron.d/, which sends a warning message, if the next scheduled job (taken from the TimeSchedule property + 10 minutes) did not run. This guarantees, that you will be notfied even in case of a affa server outage. The watchdog script send a daily reminder message, if the error continues. The next run job replaces the watchdog script with a new trigger time.
+
| yes ''or'' no
 +
| no
 +
| no
 +
| When set to 'no' the job ignores affa --kill or affa --killall when deduplication is running. This is useful in the context of killAt which is typically used to stop bandwith utilisation.
 
|-
 
|-
 
| sshPort
 
| sshPort
| service port || 22 || When sshd on the source host or your firewall listen on a non-standard port set the port here.
+
| service port  
 +
| no
 +
| 22
 +
| When sshd on the remote host listens on a non-standard port, set the port here.
 
|-
 
|-
 
| ConnectionCheckTimeout
 
| ConnectionCheckTimeout
| seconds || 120 || before the rsync process is started on the remote source host, affa checks the ssh connection and exits with an error after the configured time, if the host does not respond.
+
| seconds
 +
| no
 +
| 120
 +
| Affa checks the ssh connection before the rsync process is started and exits with an error after the configured time if the host did not respond.
 +
|-
 +
| BandwidthLimit
 +
| integer>=0 kilobytes per second
 +
| no
 +
| 0
 +
| Limits the data transfer rate. A value of zero specifies no limit.
 
|-  
 
|-  
 
| rsyncTimeout
 
| rsyncTimeout
| seconds || 900 || Rsync exits, if no data is transferred for the configured time. This avoids infinitely hanging in case of a network error.
+
| seconds
 +
| no
 +
| 900
 +
| Rsync exits after the configured time if no data was transferred. This avoids infinitely hanging in case of a network error.
 
|-  
 
|-  
| BandwidthLimit
+
| rsyncCompress
| integer>=0 kilobytes per second|| 0 || Limits the data transfer rate. A value of zero specifies no limit.
+
| yes ''or'' no
 +
| no
 +
| yes
 +
| Compress the transferred data. May be useful with slow internet connections. Increases CPU load on remote and backup host.
 
|-  
 
|-  
| rsyncCompress
+
| rsync--inplace
| yes ''or'' no || no || compress the transferred data. May be useful with slow internet connections. Increases CPU load on source and backup host.
+
| yes ''or'' no
 +
| no
 +
| yes
 +
| Set to no if the rsync version on the remote hist does not support this option.
 +
|-
 +
| rsync--modify-window
 +
| integer >= 0
 +
| no
 +
| 0
 +
| When comparing two timestamps, rsync treats the timestamps as being equal if they differ by no more than the modify-window value. This is normally 0 for an exact match. A value >= 0 is useful if you can't get the clocks of the remote host and the Affa server in sync.
 +
|-
 +
| rsyncOptions
 +
| string
 +
| no
 +
| none
 +
| Additional option string to be passed to rsync
 
|-
 
|-
| EmailAddresses
+
| localNice
| name@domain.com,name@domain.com,... || admin|| comma separated list of mail addresses, where the messages should be sent to<br>'''Note:''' By default Affa only sends messages on errors, never on success (see property chattyOnSuccess).
+
| -19...+19
 +
| no
 +
| 0
 +
| run rsync local process niced.  
 
|-
 
|-
| RetryAttempts
+
| remoteNice
| integer >= 0 || 3 || when set to a value>0, Affa re-run a failed job RetryAttempts times with a delay of RetryAfter seconds.
+
| -19...+19
 +
| no
 +
| 0
 +
| run rsync process on source niced.
 +
 
 +
 
 +
|-
 +
| SMEServer
 +
| yes ''or'' no || yes || when set to yes the default e-smith directories are automatically included and the property RPMCheck=yes can be used
 +
 
 
|-
 
|-
| RetryAfter
+
| RPMCheck
| seconds >= 3 || 600 || when set to a value>0, wait RetryAfter seconds before re-running the job after an error. Only applicable with RetryAttempts>0
+
| yes ''or'' no || no || Only applicable to jobs that backups a SME 7 server.<br>Compares the packages installation of the source host with this affa backup host. Sends a message with diff list if not in sync. This check is usefull, if you want have the option to rise the backup server to a production server from a backup.
 
|-
 
|-
| RetryNotification
+
| DiskSpaceWarn
| yes ''or'' no || yes || when set to no, Affa does not send an error message when a job has failed and RetryAttempts is configured. An error message is only send when the last attempt has failed.
+
| strict ''or'' normal ''or'' risky ''or'' none || strict || run a disk space check after a job has been completed. With level 'strict' a warning message will be sent, if the available space is less then the size of the just completed backup. With level 'normal'/'risky' the message is sent, if less than 50%/10% of the backup size is still available.
 +
'''Note:''' When RootDir is a symbolic link to another filesystem the disk usage of the local filesystem rather than the linked filesystem is checked. Set the mountpoint as the RootDir to get correct checking.
 +
 
 +
|-
 +
| Watchdog
 +
| yes ''or'' no || yes || Only applicable to jobs that backups a SME 7 server.<br>When a job is started, affa installs a watchdog script on the source in /etc/cron.d/, which sends a warning message, if the next scheduled job (taken from the TimeSchedule property + 10 minutes) did not run. This guarantees, that you will be notfied even in case of a affa server outage. The watchdog script send a daily reminder message, if the error continues. The next run job replaces the watchdog script with a new trigger time.
 +
 
 +
 
 
|-
 
|-
 
| chattyOnSuccess
 
| chattyOnSuccess
Line 357: Line 508:  
| AutoUnmount  
 
| AutoUnmount  
 
| yes ''or'' no || yes || When set to 'no' the automounted device stay mounted after the Affa run.
 
| yes ''or'' no || yes || When set to 'no' the automounted device stay mounted after the Affa run.
|-
  −
| preJobCommand<br>postJobCommand
  −
| full path || || programs (local on the affa server) to be executed before/after a job run. The job name and type (scheduled, daily etc.) are passed as arguments to the program. The exit code is additionally passed to the post job command program. See /usr/lib/affa/ for sample perl scripts.
  −
|-
  −
| RootDir
  −
| full path || /var/affa || where to store the backup archives, Do not use /home/e-smith or /root as these are included in the backup and therefore the rise option will not work! Recommended: /var/affa
  −
|-
  −
| SambaShare
  −
| yes ''or'' no|| yes || Access to the job archives via SMB
   
|-
 
|-
 
| Debug  
 
| Debug  
Line 372: Line 514:  
| status
 
| status
 
| enabled ''or'' disabled || enabled || with set to disabled, no cron entries will made. You can still run a job manually.
 
| enabled ''or'' disabled || enabled || with set to disabled, no cron entries will made. You can still run a job manually.
|-
+
 
| rsync--inplace
  −
| yes ''or'' no || yes || set to no, if the rsync version on the source does not support this option (like rsync on SME6)
  −
|-
  −
| rsync--modify-window
  −
| integer >= 0 || 0 || When comparing two timestamps, rsync treats the timestamps as being equal if they differ by no more than the modify-window value. This is normally 0 for an exact match. A value >= 0 is useful if you can't get the clocks of the source and the Affa server in sync.
  −
|-
  −
| rsyncOptions
  −
| string || || addtional option string to be passed to rsync
   
|-
 
|-
 
| rsyncdMode
 
| rsyncdMode
28

edits

Navigation menu