Line 106: |
Line 106: |
| affa --make-cronjobs | | affa --make-cronjobs |
| and logout and re-login to the console to take the bash auto-completion (TAB key) in effect. | | and logout and re-login to the console to take the bash auto-completion (TAB key) in effect. |
| + | |
| + | ==== Quick start example for Affa 2 ==== |
| + | You have a SME 7 production server with hostname 'prodbox‘ and IP 10.200.48.1.<br> |
| + | Set up a second SME 7 box as your backupserver with hostname 'affabox‘ and IP 10.200.48.2. |
| + | |
| + | <ol></li><li>log into the 'affabox' and install the packages as described above. |
| + | </li><li>copy the config helper script sample |
| + | cp /usr/lib/affa/jobconfig-sample.pl /root/prodbox-job.pl |
| + | </li><li>edit /root/prodbox-job.pl and set |
| + | my $jobname='prodbox'; |
| + | and |
| + | 'remoteHostName‘=>'10.200.48.1', |
| + | optionally, if the remote server port is configured to e.g. 2222 then set |
| + | 'sshPort'=>2222, |
| + | </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) |
| + | /root/prodbox-job.pl |
| + | </li><li>generate the DSA keys and send the public key to the 'prodbox' |
| + | {{Note box|When initially doing this step, you will need to temporarily enable "Allow secure shell access using standard passwords" on the production server}} |
| + | affa --send-key prodbox |
| + | </li><li>run the job manually |
| + | |
| + | affa --run prodbox |
| + | </li></ol> |
| + | |
| + | ==== Configuration ==== |
| + | The configuration is stored in an e-smith style database. Use the db command to configure Affa. |
| + | 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 |
| + | |
| + | then set the properties |
| + | |
| + | 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 |
| + | |
| </div> | | </div> |
| | | |
Line 132: |
Line 179: |
| | | |
| | | |
− | ===Create backup jobs=== | + | === Create 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 config file |
| touch /etc/affa/sme-backup.conf | | touch /etc/affa/sme-backup.conf |
− | and add content as described as <to be added>. | + | where ''sme-backup'' is your jobname, and add content as described below. |
| | | |
| === Quick start example === | | === Quick start example === |