Changes

Jump to navigation Jump to search
1,785 bytes added ,  19:34, 26 October 2014
Further rework to move instructions towards Affa 3.
Line 399: Line 399:  
| yes
 
| yes
 
| <none>
 
| <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.
+
| 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.<br>'''Note:''' If you use the parameter “SMEServer=yes”, you may delete the “Included” relative to SME default directories in the jobconfig.ini: they will be backuped automatically.
 
|-
 
|-
 
| postJobCommand<br> postJobCommandRemote
 
| postJobCommand<br> postJobCommandRemote
Line 405: Line 405:  
| yes
 
| yes
 
| <none>
 
| <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.
+
| 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.<br>'''Note:''' If you use the parameter “SMEServer=yes”, you may delete the “Included” relative to SME default directories in the jobconfig.ini: they will be backuped automatically.
 
|-
 
|-
 
| dedup
 
| dedup
Line 644: Line 644:  
Configures the cronjobs as scheduled in the jobs records. By default this command will by executed by 'cronjobs' every 15 minutes. So you don't need to run this command manually, you can also just wait max. 15 minutes before your updates job configurations become effective.
 
Configures the cronjobs as scheduled in the jobs records. By default this command will by executed by 'cronjobs' every 15 minutes. So you don't need to run this command manually, you can also just wait max. 15 minutes before your updates job configurations become effective.
    +
'''affa --configcheck'''
 +
Checks the syntax and values in all configuration files found in /etc/affa/. Run this command after modifying the configuration. Lower/Upper case errors in property names are corrected automatically.
   −
  '''affa --send-key JOB'''
+
  '''affa --make-cronjobs'''
'''affa --send-key --host=TARGETHOST [--port=PORT]'''
+
Configures the cronjobs. Run this command to make changes of time related properties effective i.e. TimeSchedule, killAt and resumekKilledAt properties. Every 15 minutes Affa checks whether a configuration file is newer than the cronjob file and runs the make-cronjobs command if this is the case.
This first generates the DSA key for the Affa Server, if not already done. Then it sends the public key to the host 'remoteHostName' as configured in the record of job JOB and generates the job specific ssh known host entry.  
  −
{{Note box|When initially doing this step, you will need to temporarily enable "Allow secure shell access using standard passwords" on the production server.}}
  −
{{Note box|<nowiki>By default, the --send-key option works for a SME Server as a remote server and for systems where the keys are stored in /root/.ssh/authorized_keys2 and the commands /bin/cat, /bin/touch, /bin/grep and /bin/mv are available.</nowiki>}}
  −
 
     −
  '''affa --full-restore JOB [ARCHIVE]'''
+
  '''affa --send-key [JOB JOB ...]'''
Does a full restore of the standard and additional included files and directories from the backup ARCHIVE on the remote source server as defined in the JOB record. 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. After the restore the source host reboots.
+
This first generates the DSA key on the Affa Server, if not already done. Then the public key is send to the hosts 'remoteHostName' as defined in section of each job JOB and generates the job specific ssh known host entry.
 +
{{Note box|When initially doing this step, you will need to temporarily enable "Allow secure shell access using standard passwords" on the source server.}}
    +
'''affa --check-connections [JOB JOB ...]'''
 +
Checks the ssh login and if applicable rsyncd auth for all jobs given as arguments. Without any arguments all jobs are checked.
   −
  '''affa --rise [--all] JOB [ARCHIVE]'''
+
  '''affa --full-restore [--preserve-newer=no] [--delete=yes] JOB [ARCHIVE]'''
Runs a full restore on the Affa server <b>(!)</b> of all standard files and directories from the backup ARCHIVE of job JOB. In other words: After completion, the Affa box reboots as a clone of the source server. Ensure, that the source server has been powered off before you reboot the Affa box, otherwise the network interface will not come up. This is important, when you run --rise remotely. The --rise feature only works with SME servers und should only be used on dedicated backup servers.
+
Does a full restore remote server of all backed up files and directories from the backup ARCHIVE. 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. After the restore the source host reboots.
   −
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 dada must be removed manually.
+
With option --preserve-newer=yes files on the remote server with modification time newer than on the backup are not overwritten.
   −
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. See also: [[Backup_server_config#Standard_backup_.26_restore_inclusions]]
+
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.
   −
  '''affa --undo-rise'''
+
  '''affa --list-archives [--csv] JOB'''
This feature reverts a risen Affa box to a backup server. After a reboot, all configured jobs will work again.
+
Displays a table of all present archives of job JOB with date, number of files, size and and bytes received. While column buTime shows the actual rsync time, the column ddTime shows the length of the subsequent deduplication run. ddYld is the gained deduplication yield in bytes.
 
  −
 
  −
'''affa --unchunk-archive JOB ARCHIVE'''
  −
Concatenate and uncompress all chunked files in the archive ARCHIVE of job JOB to make the archive ready for a restore. Note that the most recent archive scheduled.0 is never chunked and therfore can be restored as it is without previous unchunking.
  −
 
  −
 
  −
'''affa --chunk-archive JOB ARCHIVE'''
  −
Chunk and compress all files that match the names in property chunkFiles to save disk space. The should only be used as the reversal of --unchunk-archive. Chunks are stored as bzip2 files in a directory named FILENAME.affa-chunks with 8 levels depth.
  −
 
  −
 
  −
 
  −
'''affa --create-backup-file JOB [ARCHIVE] [--outfile=FILE]'''
  −
Creates a gzipped tar archive FILE from the ARCHIVE of job JOB. During creation the MD5 checksum is calculated against which the written tar is checked. The default ARCHIVE is scheduled.0 and default the FILE is ./smeserver.tgz. The checksum is written to FILE.md5sum.
  −
 
  −
A smeserver.tgz file stored on an USB disk can be used for restore during a SME Server fresh install.
  −
 
      
  '''affa --list-archives [--csv] JOB'''
 
  '''affa --list-archives [--csv] JOB'''
 
Displays a table of all present archives of job JOB with date, number of files, size and and bytes received.  
 
Displays a table of all present archives of job JOB with date, number of files, size and and bytes received.  
 
<small><pre>
 
<small><pre>
Affa version 2.0.0-rc4 on affa1.mydomain.de (10.204.48.2)
+
Affa version 3.1.0-0 on affa-2.mydomain.com
 
+------------------------------------------------------------------------------+
 
+------------------------------------------------------------------------------+
| Job: primmail                                                                |
+
| Job: fshare-ak                                                              |
| Description: Mailserver Albstadt                                            |
+
| Description: Fileserver AK                                                  |
| Directory: /var/affa/primmail/                                               |
+
| Directory: /var/affa/fshare-ak/                                             |
| Hostname: 10.204.144.2                                                       |
+
| Hostname: 10.204.104.4                                                       |
| Email: admin@mydomain.de                                            |
+
| Email: sysadmin@mydomain.com                                                |
+-------+-----------------------+-----------+----------------+--------+--------+
+
+-----+----------------------+--------+--------+-------+-------+-------+-------+
| Run   | Completion date       | Exec Time |         Files |   Size | Recvd |
+
| Run | Completion date     | buTime | ddTime | ddYld | Files | Size | Recvd |
+-------+-----------------------+-----------+----------------+--------+--------+
+
+-----+----------------------+--------+--------+-------+-------+-------+-------+
| M 9   | Sun 2008 Mar 02 06:11 0h29m47s |         679010 80GB 60MB |
+
| Y 0 | Wed 2010-06-23 20:26 | 11m53s |      - |    - |  412k |  143G |  470M |
| M 8   | Sun 2008 Mar 30 06:12 0h26m59s |         701683 83GB |  48MB |
+
+-----+----------------------+--------+--------+-------+-------+-------+-------+
| M 7   | Sun 2008 Apr 27 06:16 0h28m01s |         731332 |   87GB |  47MB |
+
| M11 | Sun 2010-08-29 20:22 |  7m50s |      - |    - |  417k |  153G |   14M |
| M 6   | Sun 2008 Jun 01 06:20 0h27m37s |         755529 |  90GB 50MB |
+
| M10 | Sun 2010-09-26 20:23 | 8m57s  |      - |    - 430k | 156G 14M |
| M 5   | Sun 2008 Jun 29 06:24 0h28m39s |         800200 |  94GB 52MB |
+
| M 9 | Sun 2010-10-31 20:25 | 10m05s |      - |    - |  448k |  161G 15M |
| M 4   | Sun 2008 Jul 27 06:28 |  0h29m10s |         835398 |  99GB 59MB |
+
| M 8 | Sun 2010-11-28 20:31 | 16m42s |      - |    - 463k | 167G 17M |
| M 3   | Sun 2008 Aug 31 06:34 0h34m53s |        869409 101GB 65MB |
+
| M 7 | Sun 2011-01-02 20:48 | 33m07s |      - |    - 486k | 173G | 1.1G |
| M 2   | Sun 2008 Sep 28 06:38 0h33m19s |        910889 106GB 59MB |
+
| M 6 | Sun 2011-01-30 20:33 | 18m54s |      - |    - 493k | 176G 24M |
| M 1   | Sun 2008 Oct 26 06:42 0h38m41s |        932627 110GB 61MB |
+
| M 5 | Sun 2011-02-27 20:28 | 13m31s |      - |    - 490k | 176G 19M |
| M 0   | Sun 2008 Nov 30 06:48 0h51m44s |        954090 116GB 75MB |
+
| M 4 | Sun 2011-03-27 20:28 | 13m08s |      - |    - 491k | 175G 17M |
+-------+-----------------------+-----------+----------------+--------+--------+
+
| M 3 | Sun 2011-05-01 20:30 | 15m41s |      - |    - 493k 179G 18M |
| W 3   | Sun 2008 Dec 14 06:50 0h53m34s |        962267 118GB 68MB |
+
| M 2 | Sun 2011-05-29 20:28 | 13m40s |      - |    - 494k 182G 31M |
| W 2   | Sun 2008 Dec 21 06:52 0h53m11s |         974914 120GB |  69MB |
+
| M 1 | Sun 2011-06-19 20:26 | 11m20s |      - |    - 493k 183G 17M |
| W 1   | Wed 2008 Dec 24 06:52 0h48m58s |        974536 120GB 64MB |
+
| M 0 | Sun 2011-07-03 20:28 | 13m46s |      - |    - 496k 183G 18M |
| W 0   | Sun 2008 Dec 28 06:58 0h39m01s |         977003 120GB 61MB |
+
+-----+----------------------+--------+--------+-------+-------+-------+-------+
+-------+-----------------------+-----------+----------------+--------+--------+
+
| W 3 | Sun 2011-07-10 20:28 | 13m38s |      - |    - 479k 180G 16M |
| D 6   | Tue 2008 Dec 30 06:52 0h54m45s |         976872 120GB |  77MB |
+
| W 2 | Mon 2011-07-11 20:35 | 20m27s |      - |    - 479k | 180G 301M |
| D 5   | Wed 2008 Dec 31 06:52 0h49m10s |         977764 120GB 63MB |
+
| W 1 | Fri 2011-07-15 20:30 | 15m53s |      - |    - 480k 180G 62M |
| D 4   | Thu 2009 Jan 01 06:28 0h28m09s |         977879 120GB 60MB |
+
| W 0 | Sun 2011-07-24 19:39 9m25s |      - |     - 482k |  181G 16M |
| D 3   | Fri 2009 Jan 02 06:53 0h53m21s |         978144 120GB 68MB |
+
+-----+----------------------+--------+--------+-------+-------+-------+-------+
| D 2   | Sat 2009 Jan 03 06:53 0h53m15s |         978072 120GB |   60MB |
+
| D 6 | Thu 2011-07-28 19:42 | 12m22s |      - |    - 483k | 182G 176M |
| D 1   | Sun 2009 Jan 04 06:53 0h53m16s |         976478 120GB 70MB |
+
| D 5 | Fri 2011-07-29 23:29 | 11m10s 5h33m |   45G |  483k 182G 16M |
| D 0   | Mon 2009 Jan 05 06:52 0h52m42s |         977062 120GB |   61MB |
+
| D 4 | Sat 2011-07-30 19:53 | 23m26s |  2h30m 8.3G | 483k 182G 17M |
+-------+-----------------------+-----------+----------------+--------+--------+
+
| D 3 | Sun 2011-07-31 20:07 | 37m31s 4m47s | 8.3G 483k |  182G 17M |
| S 1  | Mon 2009 Jan 05 17:57 0h27m48s |         976353 120GB 98MB |
+
| D 2 | Mon 2011-08-01 20:44 |  1h14m |  7h50m 8.5G | 484k 182G | 630M |
| S 0  | Tue 2009 Jan 06 06:52 0h52m55s |         976539 120GB 70MB |
+
| D 1 | Tue 2011-08-02 20:02 | 32m28s | 12h20m 8.3G | 484k 182G 74M |
+-------+-----------------------+-----------+----------------+--------+--------+
+
| D 0 | Wed 2011-08-03 19:58 | 28m46s | 11h01m 8.5G | 484k 182G | 214M |
 +
+-----+----------------------+--------+--------+-------+-------+-------+-------+
 +
| S 0 | Thu 2011-08-04 20:00 | 30m28s | 11h52m |  8.5G |  484k |  182G |  203M |
 +
+-----+----------------------+--------+--------+-------+-------+-------+-------+
 +
</pre></small>
 +
With --csv, the output is in machine readable colon separated format.
 +
 
 +
'''affa --status [--csv]'''
 +
Displays a table of all configured jobs with enable status, time of last and next run, size of the most recent archive, exectution time of the last run and the number of scheduled (S), daily (D), weekly (W), monthly (M) and yearly (Y) archives. If last time shows 'failed', the job did not run in the last 24h. For disabled jobs 'Last' always shows 'failed' after 24 h. To see the date and time of the last run of those jobs use the --list-archives option. Column 'Next' shows the time when the next run will be started, if 'Enabled' is 'yes'. Column 'ddYld' shows the deduplication yield in bytes.
 +
 
 +
<small><pre>
 +
Affa version 3.1.0-0 on affa-2.mydomain.com
 +
+--------------+-----+-------+--------+-------+-------+-------+----------------+
 +
| Job          | ENA |  Last |   Time | Next Size | ddYld | N of S,D,W,M,Y |
 +
+--------------+-----+-------+--------+-------+-------+-------+----------------+
 +
| ads-ak      | yes | 20:20 0m29s | 20:20 28M |    - |  1, 7, 2, 0, 0 |
 +
| ak-user-ma.. | yes | 22:31 |  1m51s | 22:30 |  170M |    - |  3, 7, 4, 6, 0 |
 +
| azubi-1      | yes | 03:39 |  3h24m | 00:15 |   44G |  1.2G |  1, 7, 4,10, 1 |
 +
| dcpant      | yes | 03:06 |  1m03s | 03:05 |  1.3G |    - |  1, 7, 4,10, 1 |
 +
| eshare      | yes | 21:06 | 21m01s | 20:45 |  24G |  178M |  1, 7, 4,10, 1 |
 +
| etherpad    | yes | 20:40 |  0m13s | 20:40 3.1M |    - | 1, 7, 4, 2, 0 |
 +
| fazubi      | yes | 08:16 | 11h16m | 21:00 |  132G |  3.3G 1, 7, 4,10, 1 |
 +
| fschare-rh   | yes | de-duplicating (pid 9719)              |  1, 7, 4,10, 1 |
 +
| fsh-02      | yes | 07:53 | 12h23m | 19:30 |  182G |  8.5G |  1, 7, 4,10, 1 |
 +
| fshare-ak2  | yes | 00:30 |  0m26s | 00:30 |  415M |  544k |  1, 7, 4,10, 1 |
 +
| helpdesk    | yes | 21:27 |  2m16s | 21:25 |  895M |  138k |  1, 7, 4,10, 0 |
 +
| it-share    | yes | running rsync (pid 9744)              |  1, 7, 1, 0, 0 |
 +
| lightroom    | yes | waiting (pid 9528)                    |  1, 7, 4, 2, 0 |
 +
| localhost    | yes | 02:15 |  0m08s | 02:15 |  395k |    - |  1, 7, 2, 0, 0 |
 +
| mediawiki    | yes | 16:10 |  0m06s | 19:40 |  1.1G |  6.7M |  3, 7, 4,10, 1 |
 +
| mshare      | yes | 00:48 |  1h33m | 23:15 |  18G |  2.4G |  1, 7, 4,10, 1 |
 +
| wshare      | yes | 00:34 |  1h49m | 22:45 |  23G |  484M |  1, 7, 4,10, 1 |
 +
+--------------+-----+-------+--------+-------+-------+-------+----------------+
 +
2 disabled jobs not listed. Use --all to display.
 
</pre></small>
 
</pre></small>
 
With --csv, the output is in machine readable colon separated format.
 
With --csv, the output is in machine readable colon separated format.
    +
'''affa --show-config-pathes [--csv] [JOB JOB ...]'''
 +
Prints the full pathes of the file where the section of job JOB is defined.
 +
 +
'''affa --show-default-config'''
 +
Prints a list of all allowed property names with their default values. These values are used, when omitted in the job sections.
   −
  '''affa --status [--csv]'''
+
  '''affa --show-schedule [--all]'''
Displays a table of all configured jobs with enable status, time of last and next run, size of the most recent archive, exectution time of the last run and the number of scheduled (S), daily (D), weekly (W), monthly (M) and yearly (Y) archives. Last time shows 'failed', if a job did not run in the last 24h. For disabled jobs 'Last' always shows 'failed' after 24 h. To see the date and time of the last run of those jobs use the --list-archives option. Column 'Next' shows the time when the next run will be started, if 'Enabled' is 'yes'.
+
Prints a 'graphical' timetable for all enabled jobs. The resolution is 30 minutes. An 'S' character marks the scheduled start times. The duration of the job runs are marked with '=' characters.
 
<small><pre>
 
<small><pre>
Affa version 2.0.0-rc4 on backup.mydomain.de (10.204.48.2)
+
Affa version 3.1.0-0 on affa-2.mydomain.com
+----------------+-----+-------+-----------+-------+-------+----------------+
+
              TIME 12:00    16:00    20:00    0:00    4:00    8:00
| Job            | ENA |  Last | Exec Time |  Next |  Size | N of S,D,W,M,Y |
+
            fsh-02 -------- -------S ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ --------
+----------------+-----+-------+-----------+-------+-------+----------------+
+
            ads-ak -------- -------- S------- -------- -------- --------
| erp-alb-rsyncd | yes | 00:20 |  0h00m14s | 00:20 |  46MB |  1, 7, 4,10, 0 |
+
          etherpad -------- -------- -S------ -------- -------- --------
| erp-fra-rsyncd | yes | 02:46 |  0h01m03s | 02:45 | 712MB |  1, 7, 4,10, 0 |
+
            eshare -------- -------- -S~----- -------- -------- --------
| esxi-TS-W2K    | yes | 00:37 |  4h22m08s | 20:15 |  60GB |  1, 7, 1, 0, 0 |
+
            fazubi -------- -------- --S~~~~~ ~~~~~~~~ ~~~~~~~~ ~-------
| esxi-W2KR2    | yes | 02:22 |  3h52m09s | 22:30 |  40GB |  1, 7, 1, 0, 0 |
+
          helpdesk -------- -------- --S----- -------- -------- --------
| helpdesk       | yes | 00:25 |  0h00m47s | 00:25 | 117MB |  1, 7, 4,10, 0 |
+
          it-share -------- -------- ---S=~~~ ~~~~~~~~ ~~~~~~~- -------- busy
| imageserv      | yes | running (pid 16477)              |  1, 7, 4,10, 0 |
+
            wshare -------- -------- -----S~~ ~~------ -------- --------
| intraweb      | yes | 06:34 |  0h04m50s | 18:00 | 2.1GB |  2, 7, 4,10, 0 |
+
ak-user-management -------- -------- -----S-- -------- -------- --------
| pdcalb        | yes | 21:19 |  0h14m27s | 21:05 |  89GB |  1, 7, 4,10, 0 |
+
         fschare-rh -------- -------- -----S=- -------- --~----- -------- busy
| pdcfra         | yes | 04:18 |  0h03m33s | 04:15 |  33GB |  1, 7, 4,10, 0 |
+
            mshare -------- -------- ------S= ~~------ -------- --------
| primmail      | yes | 06:52 |  0h52m55s | 17:30 | 120GB |  2, 7, 4,10, 0 |
+
          azubi-1 -------- -------- -------- S=~~~~~~ -------- --------
| rayofhope      | yes | 21:52 |  0h07m40s | 21:45 |  26GB |  1, 7, 4,10, 0 |
+
        fshare-ak2 -------- -------- -------- -S------ -------- --------
| smecrmpg      | yes | 22:35 |  0h00m21s | 22:35 |  70MB |  1, 7, 4,10, 0 |
+
        mediawiki -------- -------- -------- ---S---- -------- ----S---
| sozserv        | yes | 02:09 |  0h04m03s | 02:05 | 5.9GB |  1, 7, 4,10, 0 |
+
        localhost -------- -------- -------- ----S--- -------- --------
| wiki          | yes | 03:45 |  0h00m27s | 03:45 | 278MB |  1, 7, 4, 8, 0 |
+
            dcpant -------- -------- -------- ------S- -------- --------
+----------------+-----+-------+-----------+-------+-------+----------------+
+
        lightroom -------- -------- -------- -------- -------- S------- busy
| az32share      |  no | -     |  0h00m22s | 03:05 | 1.3GB |  1, 7, 4, 8, 0 |
+
Symbols: S=scheduled K=kill R=resume '='=rsync '~'=dedup
+----------------+-----+-------+-----------+-------+-------+----------------+
+
2 disabled jobs not listed. Use --all to display.
 
</pre></small>
 
</pre></small>
With --csv, the output is printed in a machine readable colon separated format.
      +
'''affa --log-tail [JOB]'''
 +
Displays the tail of the logfile of job JOB with live update. This command is identical to tail -n 50 -f /path/to/logfile. Without the JOB argument the global logfile is shown.
 +
 +
'''affa --send-status'''
 +
Sends the status table, the disk-usage and the archive list of all jobs to the email addresses configured in the [GlobalAffaConfig] section.
    
  '''affa --disk-usage'''
 
  '''affa --disk-usage'''
 
Shows the current disk usage of all root dir filesystems
 
Shows the current disk usage of all root dir filesystems
 
<small><pre>
 
<small><pre>
Affa version 2.0.0-rc4 on backup2.mydomain.de (10.204.0.52)
+
Affa version 3.1.0-0 on affa-2.mydomain.de
 
+------+--------+--------+----------------------------------------------------+
 
+------+--------+--------+----------------------------------------------------+
 
| Use% |  Used |  Avail | Root Dir                                          |
 
| Use% |  Used |  Avail | Root Dir                                          |
Line 768: Line 796:  
With --csv, the output is printed in a machine readable colon separated format.
 
With --csv, the output is printed in a machine readable colon separated format.
    +
'''affa --cleanup JOB'''
 +
After you have lowered a keep value, e.g. scheduledKeep, then archives with a higher indices will no longer be shifted and will exist for ever. This option finds these archives and deletes them after confirmation.
   −
  '''affa --show-schedule [--all]'''
+
  '''affa --rename-job JOB NEWNAME'''
Prints a 'graphical' timetable for all enabled jobs. The resolution is 30 minutes. An 'X' character marks the scheduled start times. The last performance duration is marked with '=' characters.
+
Renames the job JOB to NEWNAME including the section name and archive directories.
<small><pre>
  −
Affa version 2.0.0-rc4 on backup.mydomain.de (10.204.48.2)
  −
          TIME 0:00    4:00    8:00    12:00    16:00    20:00
  −
erp-alb-rsyncd X------- -------- -------- -------- -------- --------
  −
      helpdesk X------- -------- -------- -------- -------- --------
  −
    esxi-W2KR2 =====--- -------- -------- -------- -------- -----X==
  −
  esxi-TS-W2K ==------ -------- -------- -------- -------- X=======
  −
    imageserv ---X---- -------- -------- -------- -------- --------
  −
      sozserv ----X--- -------- -------- -------- -------- --------
  −
erp-fra-rsyncd -----X-- -------- -------- -------- -------- --------
  −
          wiki -------X -------- -------- -------- -------- --------
  −
        pdcfra -------- X------- -------- -------- -------- --------
  −
      primmail -------- ----X=-- -------- -------- ---X---- --------
  −
      intraweb -------- -----X-- -------- -------- ----X--- --------
  −
        pdcalb -------- -------- -------- -------- -------- --X-----
  −
    rayofhope -------- -------- -------- -------- -------- ---X----
  −
      smecrmpg -------- -------- -------- -------- -------- -----X--
  −
1 disabled jobs not listed. Use --all to display.
  −
</pre></small>
      +
'''affa --move-archive JOB NEWROOTDIR'''
 +
Moves the archive directory of job JOB to the rootdir NEWROOTDIR and adjusts the value of property RootDir. NEWROOTDIR must be a full path starting with a slash. As moving across filesystems (e.g. from an external USB drive to the local disk) is not possible, Affa uses a copy command in this case and deletes the source directory after that. Depending on the archive size, copying across filesystems can take a long time.
   −
  '''affa --send-status'''
+
  '''affa --delete-job [--revoke-key] JOB'''
Sends the status table, the disk-usage and the archive list of all jobs to the email addresses configured in the 'DefaultAffaConfig' record. Used by the cronjob 'affa-status'.
+
Irreversibly deletes all archives, of job JOB and set the status property to disable. With --revoke-key option, the public key on the remote server will be deleted.
    +
'''affa --revoke-key JOB'''
 +
Deletes the public dsa key on the remote server.
   −
  '''affa --mailtest JOB'''
+
  '''affa --kill JOB'''
Sends a test email to the email addresses configured in the JOB record. With property Watchdog=yes, a test email is sent from the remote host, too. Use this to verify, that your mail processing is functional.<br>
+
Terminates the running job JOB and all its child processes (rsync processes).
'''Note:''' By default Affa only sends messages on errors, never on success (see property chattyOnSuccess).
      +
'''affa --killall'''
 +
Terminates all running jobs.
   −
  '''affa --cleanup JOB'''
+
  affa --mailtest JOB
After you have lowered a keep value, e.g. scheduledKeep, then archives with a higher indices will no longer be shifted and will exist for ever. This option finds these archives and deletes them.
+
Sends a test email to the email addresses configured in the JOB section. Use this to verify, that your mail system is working.
 +
{{Note box|By default Affa only sends messages on errors, never on success (see property chattyOnSuccess).}}
    +
'''affa --nrpe [JOB JOB ...]'''
 +
Checks for jobs that were not run the last NRPRtrigger hours and reports them as failed. A Nagios/ICINGA NRPE complient message is printed and exit status returned.
   −
  '''affa --rename-job JOB NEWNAME'''
+
  '''affa --version'''
Renames the job JOB to NEWNAME including all database records and archive directories.
+
Displays the Affa version number and checks Samba and Freedup installation.
    +
'''affa --warranty'''
 +
Displays the disclaimer of liability.
   −
  '''affa --move-archive JOB NEWROOTDIR'''
+
  '''affa --license'''
Moves the archive directory of job JOB to the rootdir NEWROOTDIR and adjusts the property RootDir. NEWROOTDIR must be a full path starting with a slash. As moving across filesystems (e.g. from an external USB drive to the local disk) is not possible, Affa uses a copy command in this case and deletes the source directory after that. Depending on the archive size, copying across filesystems can take a long time.
+
Displays the license Affa is released under.
    +
'''affa --help'''
 +
Displays a short help.
   −
  '''affa --delete-job [--revoke-key] JOB'''
+
  '''affa --debug'''
Irreversibly deletes a job including all archives, configuration and report databases. With given --revoke-key option, the public key on the remote server will be deleted.
+
Enables verbose logging. Overrides job and global configurations.
    +
'''affa --rise [--all] JOB [ARCHIVE]'''
 +
Runs a full restore on the Affa server <b>(!!!)</b> of all standard files and directories from the backup ARCHIVE of job JOB. In other words: After completion, the Affa box reboots as a clone of the source server. Ensure, that the source server has been powered off before you reboot the Affa box, otherwise the network interface will not come up. This is important, when you run --rise remotely. The --rise feature only works with SME servers und should only be used on dedicated backup servers.
   −
'''affa --revoke-key JOB'''
+
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.
'''affa --revoke-key --host=TARGETHOST [--port=PORT] [--remoteOS=cygwin]'''
  −
Deletes the public dsa key on the remote server.
  −
{{Note box|<nowiki>By default, the --send-key option works for a SME Server as a remote server and for systems where the keys are stored in /root/.ssh/authorized_keys2. With remoteOS=cygwin it works for a Cygwin/Windows remote server.</nowiki>}}
      +
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.
   −
'''affa --check-connections'''
+
{{Note box|By default This command is not implemented in Affa 3 for CentOS. It has been specifically added to the fork for SME.}}
Checks the ssh login for all configured jobs. For jobs where the public key was not yet sent, you are prompted for the password and the key will be sent then.
      +
'''affa --undo-rise'''
 +
This feature reverts a risen Affa box to a backup server. After a reboot, all configured jobs will work again.
   −
'''affa --kill JOB'''
+
{{Note box|By default This command is not implemented in Affa 3 for CentOS. It has been specifically added to the fork for SME.}}
Terminates the running job JOB and all its child processes (rsync processes).
  −
 
  −
'''affa --debug'''
  −
Enables verbose logging. Overrides job and global configurations.
      
=== Example setups ===
 
=== Example setups ===
28

edits

Navigation menu