Line 178: |
Line 178: |
| signal-event post-upgrade | | signal-event post-upgrade |
| signal-event reboot | | signal-event reboot |
− | The server will reboot. | + | The server will reboot. Afterwards it is ready for installation of Affa 3. |
| | | |
| Login as root on local or remote SSH console of ''affabox''. Then create dedicated directory for Affa 3 files and go to there: | | Login as root on local or remote SSH console of ''affabox''. Then create dedicated directory for Affa 3 files and go to there: |
Line 200: |
Line 200: |
| | | |
| | | |
− | === Create backup jobs === | + | === Creation of backup jobs === |
− | Job configurations of Affa 3 are no longer stored in an e-smith style database. They are stored in configuration files located in ''/etc/affa'' . Create your config file | + | Job configurations of Affa 3 are no longer stored in an e-smith style database. They are stored in configuration files located in ''/etc/affa'' . Create your configuration files in this directory, e.g. |
− | touch /etc/affa/sme-backup.conf | + | touch /etc/affa/backup-smeserver.conf |
− | where ''sme-backup'' is your jobname, and add content as described below. | + | where ''backup-smeserver'' is your jobname, and add content as described below. |
| | | |
| ==== Quick start example ==== | | ==== Quick start example ==== |
| You have a SME production server with hostname 'smeserver‘ and IP 192.168.0.2.<br> | | You have a SME production server with hostname 'smeserver‘ and IP 192.168.0.2.<br> |
− | Set up a second SME box as your backupserver with hostname 'affabox‘ and IP 192.168.0.10.
| + | You have a second SME box as your backup server with hostname 'affabox‘ and IP 192.168.0.10. |
| | | |
− | <ol></li><li>log into the 'affabox' as root and edit.
| + | Login to your 'affabox' as root and edit ''/etc/affa/backup-smeserver.conf'' . Using e.g. editor ''nano'', create the following example job configuration file for jobname ''backup-smeserver'' : |
− | </li><li>copy the config helper script sample
| + | [backup-smeserver] |
− | cp /usr/lib/affa/jobconfig-sample.pl /root/prodbox-job.pl
| + | remoteHostName=192.168.0.2 |
− | </li><li>edit /root/prodbox-job.pl and set
| + | SMEServer=yes |
− | my $jobname='prodbox'; | + | Watchdog=yes |
− | and
| + | RPMCheck=yes |
− | 'remoteHostName‘=>'10.200.48.1', | + | ConnectionCheckTimeout=120 |
− | optionally, if the remote server port is configured to e.g. 2222 then set
| + | Debug=no |
− | 'sshPort'=>2222, | + | Description=Backup of 192.168.0.2 smeserver.athome.xx |
− | </li><li>save and run the 'prodbox-job.pl' file. This will write the configuration (this makes the database entries and sets up the cronjobs)
| + | DiskSpaceWarn=strict |
− | /root/prodbox-job.pl | + | RootDir=/var/affa |
− | </li><li>generate the DSA keys and send the public key to the 'prodbox'
| + | TimeSchedule=0630 |
− | {{Note box|When initially doing this step, you will need to temporarily enable "Allow secure shell access using standard passwords" on the production server}}
| + | localNice=15 |
− | affa --send-key prodbox | + | remoteNice=15 |
− | </li><li>run the job manually
| + | rsync--inplace=yes |
| + | rsyncCompress=no |
| + | rsyncTimeout=900 |
| + | scheduledKeep=1 |
| + | dailyKeep=7 |
| + | weeklyKeep=4 |
| + | monthlyKeep=12 |
| + | yearlyKeep=1 |
| + | status=enabled |
| + | Then save your job configuration file. |
| | | |
− | affa --run prodbox | + | Create / send key files to your productive smeserver: |
− | </li></ol>
| + | affa --send-key backup-smeserver |
| + | The following output should appear on the console: |
| + | Job sme-backup: Generating DSA keys... |
| + | Successfully created DSA key pair. |
| + | root@192.168.0.2's password: <Enter password> |
| + | Public key sent to 192.168.0.2 |
| + | Now run your job manually, both for test purposes as well as to: |
| + | affa --run backup-smeserver |
| + | The following output should appear on the console: |
| + | The authenticity of host 'backup-smeserver (192.168.0.2)' can't be established. |
| + | RSA key fingerprint is 3b..........65. |
| + | Are you sure you want ton continue connecting (yes/no)? <yes> |
| + | Now your backup job should run for the first time. Depending on the volume of the files, this take quite a while. |
| | | |
− | === Configuration ===
| + | Once the job is done, check that the archive is available: |
− | The configuration is stored in an e-smith style database. Use the db command to configure Affa.
| + | affa –-list-archives |
− | The jobname is the record key with the type 'job'.<br>To setup a new job with the name 'prodbox' enter:
| |
| | | |
− | db affa set prodbox job | + | or run the job a second time: |
| + | affa --run backup-smeserver |
| + | Note that you won't be asked for the password again. Check that the second archive is available too: |
| + | affa –-list-archives |
| | | |
− | then set the properties
| + | From here you are able to work as with Affa 2. Modify your config file as required and described below. Automate the backup using the command ''affa --make-cronjobs'', see below. |
− | | |
− | db affa setprop prodbox remoteHostName 192.168.1.1
| |
− | db affa setprop prodbox TimeSchedule '0030,0730,1130,1330,1730,2030'
| |
− | db affa setprop prodbox Description 'My Production Server'
| |
− | db affa setprop prodbox status enabled
| |
− | and so on... | |
− | | |
− | Alternatively you can you use a script as described above in the 'Quick start' chapter.
| |
− | | |
− | To verify your work, type:
| |
− | | |
− | db affa show prodbox
| |
− | | |
− | Finally set up the cronjobs:
| |
− | affa --make-cronjobs
| |
| | | |
| ==== Job configuration properties ==== | | ==== Job configuration properties ==== |