4.0.0alpha.svn.7719
Amanda::Rest modules list
Amanda modules list
List of All Modules
All Amanda Releases

Amanda::Rest::Runs

NAME

Amanda::Rest::Runs -- Rest interface to Amanda::Amdump, Amanda::Amflush, Amanda::Vault

INTERFACE

Run amdump
 request:
  POST localhost:5000/amanda/v1.0/configs/:CONFIG/runs/amdump
    query arguments:
        host=HOST
        disk=DISK               #repeatable
        hostdisk=HOST|DISK      #repeatable
        no_taper=0|1
        from_client=0|1

 reply:
  HTTP status: 202 Accepted
  [
     {
        "timestamp" : "20140205112550",
        "code" : "2000003",
        "message" : "The timestamp is '20140205112550'",
        "severity" : "2",
        "source_filename" : "/usr/lib/amanda/perl/Amanda/Amdump.pm",
        "source_line" : "96"
     },
     {
        "tracefile" : "/var/log/amanda/test/amdump.20140205112550",
        "code" : "2000001",
        "message" : "The amdump log file is '/var/log/amanda/test/amdump.20140205112550'",
        "severity" : "2",
        "source_filename" : "/usr/lib/amanda/perl/Amanda/Amdump.pm",
        "source_line" : "102"
     },
     {
        "code" : "2000000",
        "message" : "The trace log file is '/var/log/amanda/test/log.20140205112550.0'",
        "severity" : "2",
        "source_filename" : "/usr/lib/amanda/perl/Amanda/Amdump.pm",
        "source_line" : "108",
        "logfile" : "/var/log/amanda/test/log.20140205112550.0"
     },
     {
        "code" : "2000002",
        "message" : "Running a dump",
        "severity" : "2",
        "source_filename" : "/usr/lib/amanda/perl/Amanda/Rest/Runs.pm",
        "source_line" : "269"
     }
  ]
Run amflush
 request:
  POST localhost:5000/amanda/v1.0/configs/:CONFIG/runs/amflush
    query arguments:
        host=HOST
        disk=DISK               #repeatable
        hostdisk=HOST|DISK      #repeatable
        datestamps=DATESTAMP    #repeatable

 reply:
  HTTP status: 202 Accepted
  [
     {
        "timestamp" : "20140205120327",
        "code" : "2200006",
        "message" : "The timestamp is '20140205120327'",
        "severity" : "2",
        "source_filename" : "/usr/lib/amanda/perl/Amanda/Amflush.pm",
        "source_line" : "101"
     },
     {
        "tracefile" : "/var/log/amanda/test/amdump.20140205120327",
        "code" : "2200001",
        "message" : "The amdump log file is '/var/log/amanda/test/amdump.20140205120327'",
        "severity" : "2",
        "source_filename" : "/usr/lib/amanda/perl/Amanda/Amflush.pm",
        "source_line" : "107"
     },
     {
        "code" : "2200000",
        "message" : "The log file is '/var/log/amanda/test/log.20140205120327.0'",
        "severity" : "2",
        "source_filename" : "/usr/lib/amanda/perl/Amanda/Amflush.pm",
        "source_line" : "113",
        "logfile" : "/var/log/amanda/test/log.20140205120327.0"
     },
     {
        "code" : "2200005",
        "message" : "Running a flush",
        "severity" : "2",
        "source_filename" : "/usr/lib/amanda/perl/Amanda/Rest/Runs.pm",
        "source_line" : "421"
     }
  ]
Run amvault
 request:
  POST localhost:5000/amanda/v1.0/configs/:CONFIG/runs/amvault
    query arguments:
        host=HOST
        disk=DISK               #repeatable
        hostdisk=HOST|DISK      #repeatable
        quiet=0|1
        fulls_only=0|1
        latest_fulls=0|1
        incrs_only=0|1
        opt_export=0|1
        opt_dry_run=0|1
        src_write_timestamp=TIMESTAMP
        dst_write_timestamp=TIMESTAMP

 reply:
  HTTP status: 202 Accepted
Run amcheckdump
 request:
  POST localhost:5000/amanda/v1.0/configs/:CONFIG/runs/checkdump
    query argument:
        timestamp=TIMESTAMP

 reply:
  HTTP status 202 Accepted
  [
     {
        "code" : "2700018",
        "message" : "Running a CheckDump",
        "severity" : "2",
        "source_filename" : "/usr/lib/amanda/perl/Amanda/Rest/Runs.pm",
        "source_line" : "415"
     },
     {
        "code" : "2700020",
        "message" : "The message filename is 'checkdump.3545'",
        "message_filename" : "checkdump.3545",
        "severity" : "2",
        "source_filename" : "/usr/lib/amanda/perl/Amanda/Rest/Runs.pm",
        "source_line" : "420"
     }
  ]
Get messages for amcheckdump
 request:
  GET localhost:5000/amanda/v1.0/configs/:CONFIG/runs/messages
    query argument:
        message_filename=MESAGE_FILENAME

 reply:
  HTTP status 200 Ok
  [
     {
        "code" : 2700001,
        "labels" : [
           {
              "available" : 0,
              "label" : "test-ORG-AG-vtapes-005",
              "storage" : "my_vtapes"
           }
        ],
        "message" : "You will need the following volume: test-ORG-AG-vtapes-005",
        "severity" : 16,
        "source_filename" : "/usr/lib/amanda/perl/Amanda/CheckDump.pm",
        "source_line" : "367"
     },
     {
        "code" : 2700005,
        "diskname" : "/bootAMGTAR",
        "dump_timestamp" : "20140516130638",
        "hostname" : "localhost.localdomain",
        "level" : 1,
        "message" : "Validating image localhost.localdomain:/bootAMGTAR dumped 20140516130638 level 1",
        "nparts" : 1,
        "severity" : 16,
        "source_filename" : "/usr/lib/amanda/perl/Amanda/CheckDump.pm",
        "source_line" : "402"
     },
     {
        "code" : 2700003,
        "filenum" : 1,
        "label" : "test-ORG-AG-vtapes-005",
        "message" : "Reading volume test-ORG-AG-vtapes-005 file 1",
        "severity" : 16,
        "source_filename" : "/usr/lib/amanda/perl/Amanda/CheckDump.pm",
        "source_line" : "175"
     },
     {
        "code" : 2700006,
        "message" : "All images successfully validated",
        "severity" : 16,
        "source_filename" : "/usr/lib/amanda/perl/Amanda/CheckDump.pm",
        "source_line" : "695"
     }
  ]
Run amfetchdump --extract
 request:
  POST localhost:5000/amanda/v1.0/configs/:CONFIG/runs/fetchdump
    query argument:
      host=HOST
      disk=DISK
      timestamp=TIMESTAMP
      level=LEVEL
      write_timestamp=WRITE_TIMESTAMP
      directory=/PATH/WHERE/TO/EXTRACT

      The application_property setting can only be set in the body
    of the POST request, the Content-Type header must be set to
    'application/json'.

    POST header:
        Content-Type: application/json
    POST body (example):
      { "application_property":{ "esxpass":"/etc/amanda/esxpass"}}

 reply:
  HTTP status 202 Accepted
  [
   {
      "code" : "3300057",
      "message" : "Running a Fetchdump",
      "severity" : "2",
      "source_filename" : "/amanda/h1/linux/lib/amanda/perl/Amanda/Rest/Runs.pm",
      "source_line" : "734"
   },
   {
      "code" : "3300059",
      "message" : "The message filename is 'fetchdump.27363'",
      "message_filename" : "fetchdump.27363",
      "severity" : "2",
      "source_filename" : "/amanda/h1/linux/lib/amanda/perl/Amanda/Rest/Runs.pm",
      "source_line" : "739"
   }
  ]
Get messages for amfetchdump
 request:
  GET localhost:5000/amanda/v1.0/configs/:CONFIG/runs/messages
    query argument:
        message_filename=MESAGE_FILENAME

 reply:
  HTTP status 200 Ok
  [
   {
      "code" : 3300002,
      "message" : "1 volume(s) needed for restoration\nThe following volumes are needed: Xtest-ORG-AG-vtapes-004\n",
      "needed_holding" : [],
      "needed_labels" : [
         {
            "available" : 0,
            "label" : "Xtest-ORG-AG-vtapes-004",
            "storage" : "my_vtapes"
         }
      ],
      "severity" : 16,
      "source_filename" : "/usr/lib/amanda/perl/Amanda/FetchDump.pm",
      "source_line" : "689"
   },
   {
      "code" : 3300012,
      "message" : "READ SIZE: 85504 kb",
      "severity" : 16,
      "size" : 87556096,
      "source_filename" : "/usr/lib/amanda/perl/Amanda/FetchDump.pm",
      "source_line" : "1347"
   },
   {
      "code" : 3300013,
      "message" :
      "severity" : 16,
      "source_filename" : "/usr/lib/amanda/perl/Amanda/FetchDump.pm",
      "source_line" : "1357",
      "application_stdout: [ ... ]
   }
  ]
Get a list of all operations
 request:
  GET localhost:5000/amanda/v1.0/configs/:CONFIG/runs
    optional query arguments:
        status=STATUS
        run_type=$RUN_TYPE
        logfile=$LOGFILE      # log.DATESTAMP.0
        tracefile=$TRACEFILE  # amdump.DATESTAMP

 reply:
  HTTP status 200 Ok
  [
   {
      "tracefile" : "/etc/amanda/TESTCONF/logs/amdump.20140527122705",
      "code" : "2000004",
      "message" : "one run",
      "run_type" : "amdump",
      "severity" : "16",
      "source_filename" : "/usr/lib/amanda/perl/Amanda/Rest/Runs.pm",
      "source_line" : "985",
      "status" : "aborted",
      "timestamp" : "20140527122705",
      "logfile" : "/etc/amanda/TESTCONF/logst/log.20140527122705.0"
   },
   {
      "tracefile" : "/etc/amanda/TESTCONF/logs/amdump.20140702163539",
      "code" : "2000004",
      "message" : "one run",
      "run_type" : "amflush",
      "severity" : "16",
      "source_filename" : "/usr/lib/amanda/perl/Amanda/Rest/Runs.pm",
      "source_line" : "985",
      "status" : "aborted",
      "timestamp" : "20140702163539",
      "logfile" : "/etc/amanda/TESTCONF/logs/log.20140702163539.0"
   },
   {
      "tracefile" : "/etc/amanda/TESTCONF/logs/amdump.20140708100915",
      "code" : "2000004",
      "message" : "one run",
      "run_type" : "amvault",
      "severity" : "16",
      "source_filename" : "/usr/lib/amanda/perl/Amanda/Rest/Runs.pm",
      "source_line" : "985",
      "status" : "done",
      "timestamp" : "20140708100915",
      "logfile" : "/etc/amanda/TESTCONF/logs/log.20140708100915.0"
   },
   {
      "code" : "2000004",
      "message" : "one run",
      "message_file" : "/etc/amanda/TESTCONF/logs/checkdump.20140922151405",
      "run_type" : "checkdump",
      "severity" : "16",
      "source_filename" : "/usr/lib/amanda/perl/Amanda/Rest/Runs.pm",
      "source_line" : "995",
      "status" : "done",
      "timestamp" : "20140922151405",
      "logfile" : "/etc/amanda/TESTCONF/logs/log.20140922151405.0"
   },


  ]
kill a run (amcleanup)
 request:
  DELETE localhost:5000/amanda/v1.0/configs/:CONFIG/runs
    query arguments:
        logfile=LOG_FILE  # can be repeated
        kill=0|1
        alive=0|1
        clean_holding=0|1
        note=note1          # can be repeated

 reply:
  HTTP status: 200 Ok

ABOUT THIS PAGE

This page was automatically generated Tue Mar 19 07:08:16 2019 from the Amanda source tree, and documents the most recent development version of Amanda. For documentation specific to the version of Amanda on your system, use the 'perldoc' command.


4.0.0alpha.svn.7719