Line 602: |
Line 602: |
| '''affa --send-key --host=TARGETHOST [--port=PORT] [--remoteOS=cygwin]''' | | '''affa --send-key --host=TARGETHOST [--port=PORT] [--remoteOS=cygwin]''' |
| Génère d'abord la clé DSA pour le serveur Affa, si cela n'a pas déjà été fait. Envoie ensuite la clé publique à l'hôte 'remoteHostName' comme configuré dans l'enregistrement de la tâche et génère l'entrée ssh known host (hôte connu) spécifique à la tâche. | | Génère d'abord la clé DSA pour le serveur Affa, si cela n'a pas déjà été fait. Envoie ensuite la clé publique à l'hôte 'remoteHostName' comme configuré dans l'enregistrement de la tâche et génère l'entrée ssh known host (hôte connu) spécifique à la tâche. |
− | {{Note box|Initialement, lorsque vous faites cette étape, vous aurez besoin d'activer temporairement "Autoriser l'authentification par SSH à l'aide de mots de passe standards" sur le serveur de production.}} | + | {{Note box|Initialement, lorsque vous faites cette étape, vous aurez besoin d'activer temporairement «Autoriser l'authentification par SSH à l'aide de mots de passe standards» sur le serveur de production.}} |
| {{Note box|<nowiki>l'option --send-key fonctionne pour SME Server comme serveur distant et pour les systèmes sur lesquels les clés publiques sont stockées dans /root/.ssh/authorized_keys2 et sur lesquels les commandes /bin/cat, /bin/touch, /bin/grep et /bin/mv sont disponibles. Avec remoteOS=cygwin cela fonctionne pour les serveurs distants sous Cygwin/Windows.</nowiki>}} | | {{Note box|<nowiki>l'option --send-key fonctionne pour SME Server comme serveur distant et pour les systèmes sur lesquels les clés publiques sont stockées dans /root/.ssh/authorized_keys2 et sur lesquels les commandes /bin/cat, /bin/touch, /bin/grep et /bin/mv sont disponibles. Avec remoteOS=cygwin cela fonctionne pour les serveurs distants sous Cygwin/Windows.</nowiki>}} |
| | | |
| + | '''affa --check-connections [JOB JOB ...]''' |
| + | Vérifie la connexion ssh et, si nécessaire, rsyncd auth, pour toutes les tâches données en arguments. Sans aucun argument, toutes les tâches sont vérifiées. |
| | | |
| '''affa --full-restore JOB [ARCHIVE]''' | | '''affa --full-restore JOB [ARCHIVE]''' |
− | Effectue une restauration totale depuis l'archive de sauvegarde [ARCHIVE] sur le serveur source distant comme défini dans l'enregistrement JOB. Si [ARCHIVE] n'est pas donnée, l'archive 'scheduled.0' est utilisée comme défaut. La restauration totale reconstruit le serveur comme il était au moment de la sauvegarde. Après la restauration l'hôte source est redémarré. | + | Effectue une restauration totale depuis l'archive de sauvegarde [ARCHIVE] sur le serveur source distant comme défini dans l'enregistrement JOB. Si [ARCHIVE] n'est pas donnée, l'archive 'scheduled.0' est utilisée par défaut. La restauration totale reconstruit le serveur comme il était au moment de la sauvegarde. Après la restauration, l'hôte source est redémarré. |
| + | Avec l'option --preserve-newer=yes, les fichiers du serveur distant avec un heure de modification plus récente que celle de la sauvegarde ne sont pas écrasés. |
| + | Avec l'option --delete=yes, tous les fichiers du serveur distant, qui ne sont pas dans la sauvegarde, sont effacés. |
| | | |
| + | Si le paramètre "SMEServer=yes" est défini, «signal-event pre-restore» et «signal-event post-upgrade» seront automatiquement exécutés. |
| + | |
| + | '''affa --list-archives JOB''' |
| + | 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. |
| + | |
| + | <small><pre> |
| + | Affa version 3.1.0-0 on affa-2.mydomain.com |
| + | +------------------------------------------------------------------------------+ |
| + | | Job: fshare-ak | |
| + | | Description: Fileserver AK | |
| + | | Directory: /var/affa/fshare-ak/ | |
| + | | Hostname: 10.204.104.4 | |
| + | | Email: sysadmin@mydomain.com | |
| + | +-----+----------------------+--------+--------+-------+-------+-------+-------+ |
| + | | Run | Completion date | buTime | ddTime | ddYld | Files | Size | Recvd | |
| + | +-----+----------------------+--------+--------+-------+-------+-------+-------+ |
| + | | Y 0 | Wed 2010-06-23 20:26 | 11m53s | - | - | 412k | 143G | 470M | |
| + | +-----+----------------------+--------+--------+-------+-------+-------+-------+ |
| + | | M11 | Sun 2010-08-29 20:22 | 7m50s | - | - | 417k | 153G | 14M | |
| + | | M10 | Sun 2010-09-26 20:23 | 8m57s | - | - | 430k | 156G | 14M | |
| + | | M 9 | Sun 2010-10-31 20:25 | 10m05s | - | - | 448k | 161G | 15M | |
| + | | M 8 | Sun 2010-11-28 20:31 | 16m42s | - | - | 463k | 167G | 17M | |
| + | | M 7 | Sun 2011-01-02 20:48 | 33m07s | - | - | 486k | 173G | 1.1G | |
| + | | M 6 | Sun 2011-01-30 20:33 | 18m54s | - | - | 493k | 176G | 24M | |
| + | | M 5 | Sun 2011-02-27 20:28 | 13m31s | - | - | 490k | 176G | 19M | |
| + | | M 4 | Sun 2011-03-27 20:28 | 13m08s | - | - | 491k | 175G | 17M | |
| + | | M 3 | Sun 2011-05-01 20:30 | 15m41s | - | - | 493k | 179G | 18M | |
| + | | M 2 | Sun 2011-05-29 20:28 | 13m40s | - | - | 494k | 182G | 31M | |
| + | | M 1 | Sun 2011-06-19 20:26 | 11m20s | - | - | 493k | 183G | 17M | |
| + | | M 0 | Sun 2011-07-03 20:28 | 13m46s | - | - | 496k | 183G | 18M | |
| + | +-----+----------------------+--------+--------+-------+-------+-------+-------+ |
| + | | W 3 | Sun 2011-07-10 20:28 | 13m38s | - | - | 479k | 180G | 16M | |
| + | | W 2 | Mon 2011-07-11 20:35 | 20m27s | - | - | 479k | 180G | 301M | |
| + | | W 1 | Fri 2011-07-15 20:30 | 15m53s | - | - | 480k | 180G | 62M | |
| + | | W 0 | Sun 2011-07-24 19:39 | 9m25s | - | - | 482k | 181G | 16M | |
| + | +-----+----------------------+--------+--------+-------+-------+-------+-------+ |
| + | | D 6 | Thu 2011-07-28 19:42 | 12m22s | - | - | 483k | 182G | 176M | |
| + | | D 5 | Fri 2011-07-29 23:29 | 11m10s | 5h33m | 45G | 483k | 182G | 16M | |
| + | | 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 | |
| + | | D 2 | Mon 2011-08-01 20:44 | 1h14m | 7h50m | 8.5G | 484k | 182G | 630M | |
| + | | 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> |
| + | |
| + | '''affa --list-archives [--csv] JOB''' |
| + | With --csv, the output is in machine readable colon separated format. |
| + | <small><pre> |
| + | Archive:Count;Date;Files;Size;RootDirFilesystemAvail;RootDirFilesystemUsed;valid;TotalBytesReceived;ExecutionTime;DedupTotalFiles;DedupReplacedFiles;DedupSavedBytes;DedupExectime;DedupDate |
| + | monthly;00000;201509270631;393237;37252509103;166889260;47876936;yes;1327370;1160638358;99;;;;; |
| + | weekly;00003;201510040531;390273;37042612135;164566692;50199504;yes;1117726;45430532;59;;;;; |
| + | weekly;00002;201510110531;395553;37299589800;162612204;52153992;yes;1117092;92369237;64;;;;; |
| + | weekly;00001;201510180531;403831;37707599172;161855844;52910352;yes;1317083;148317764;64;;;;; |
| + | weekly;00000;201510250531;406509;38146200127;161041156;53725040;yes;1104759;64083948;63;;;;; |
| + | daily;00006;201510310531;415663;39248862982;162979176;51787020;yes;1958110;198060283;66;;;;; |
| + | daily;00005;201511010531;411014;38563389171;163061136;51705060;yes;1156506;48903675;75;;;;; |
| + | daily;00004;201511020531;408910;38612857040;162359124;52407072;yes;1007434;210812387;75;;;;; |
| + | daily;00003;201511030531;410615;37815861577;162026060;52740136;yes;1524069;162697515;67;;;;; |
| + | daily;00002;201511040531;414784;38131734213;161990024;52776172;yes;1571657;134250735;63;;;;; |
| + | daily;00001;201511050531;420780;38433895988;161906580;52859616;yes;2021507;149388808;103;;;;; |
| + | daily;00000;201511060531;425920;38677614350;161778812;52987384;yes;1987971;166510621;71;;;;; |
| + | scheduled;00000;201511070531;425663;38815712018;161612600;53153596;yes;2003540;139603231;68;;;;; |
| + | </pre></small> |
| + | |
| + | '''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> |
| + | 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 --show-schedule [--all]''' |
| + | 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> |
| + | Affa version 3.1.0-0 on affa-2.mydomain.com |
| + | TIME 12:00 16:00 20:00 0:00 4:00 8:00 |
| + | fsh-02 -------- -------S ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ -------- |
| + | ads-ak -------- -------- S------- -------- -------- -------- |
| + | etherpad -------- -------- -S------ -------- -------- -------- |
| + | eshare -------- -------- -S~----- -------- -------- -------- |
| + | fazubi -------- -------- --S~~~~~ ~~~~~~~~ ~~~~~~~~ ~------- |
| + | helpdesk -------- -------- --S----- -------- -------- -------- |
| + | it-share -------- -------- ---S=~~~ ~~~~~~~~ ~~~~~~~- -------- busy |
| + | wshare -------- -------- -----S~~ ~~------ -------- -------- |
| + | ak-user-management -------- -------- -----S-- -------- -------- -------- |
| + | fschare-rh -------- -------- -----S=- -------- --~----- -------- busy |
| + | mshare -------- -------- ------S= ~~------ -------- -------- |
| + | azubi-1 -------- -------- -------- S=~~~~~~ -------- -------- |
| + | fshare-ak2 -------- -------- -------- -S------ -------- -------- |
| + | mediawiki -------- -------- -------- ---S---- -------- ----S--- |
| + | localhost -------- -------- -------- ----S--- -------- -------- |
| + | dcpant -------- -------- -------- ------S- -------- -------- |
| + | lightroom -------- -------- -------- -------- -------- S------- busy |
| + | Symbols: S=scheduled K=kill R=resume '='=rsync '~'=dedup |
| + | 2 disabled jobs not listed. Use --all to display. |
| + | </pre></small> |
| + | |
| + | '''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''' |
| + | Shows the current disk usage of all root dir filesystems |
| + | <small><pre> |
| + | Affa version 3.1.0-0 on affa-2.mydomain.de |
| + | +------+--------+--------+----------------------------------------------------+ |
| + | | Use% | Used | Avail | Root Dir | |
| + | +------+--------+--------+----------------------------------------------------+ |
| + | | 71% | 938GB | 365GB | /var/affa | |
| + | | 20% | 194GB | 759GB | /mnt/affadev | |
| + | +------+--------+--------+----------------------------------------------------+ |
| + | </pre></small> |
| + | 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 --rename-job JOB NEWNAME''' |
| + | Renames the job JOB to NEWNAME including the section name and archive directories. |
| + | |
| + | '''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 --delete-job [--revoke-key] JOB''' |
| + | 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 --kill JOB''' |
| + | Terminates the running job JOB and all its child processes (rsync processes). |
| + | |
| + | '''affa --killall''' |
| + | Terminates all running jobs. |
| + | |
| + | affa --mailtest JOB |
| + | 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 --version''' |
| + | Displays the Affa version number and checks Samba and Freedup installation. |
| + | |
| + | '''affa --warranty''' |
| + | Displays the disclaimer of liability. |
| + | |
| + | '''affa --license''' |
| + | Displays the license Affa is released under. |
| + | |
| + | '''affa --help''' |
| + | Displays a short help. |
| + | |
| + | '''affa --debug''' |
| + | Enables verbose logging. Overrides job and global configurations. |
| + | |
| + | ==== SME Specific usage and command line options ==== |
| + | |
| + | These commands are implemented in a fork of Affa 3 project for use with SME. They are not part of the Affa 3 for CentOS project. |
| | | |
| '''affa --rise [--all] JOB [ARCHIVE]''' | | '''affa --rise [--all] JOB [ARCHIVE]''' |