github.com/smintz/nomad@v0.8.3/website/source/docs/commands/job/revert.html.md.erb (about)

     1  ---
     2  layout: "docs"
     3  page_title: "Commands: job revert"
     4  sidebar_current: "docs-commands-job-revert"
     5  description: >
     6    The revert command is used to revert to a prior version of the job.
     7  ---
     8  
     9  # Command: job revert
    10  
    11  The `job revert` command is used to revert a job to a prior version of the
    12  job. The available versions to revert to can be found using [`job
    13  history`](/docs/commands/job/history.html) command.
    14  
    15  ## Usage
    16  
    17  ```
    18  nomad job revert [options] <job> <version>
    19  ```
    20  
    21  The `job revert` command requires two inputs, the job ID and the version of that job
    22  to revert to.
    23  
    24  ## General Options
    25  
    26  <%= partial "docs/commands/_general_options" %>
    27  
    28  ## Revert Options
    29  
    30  * `-detach`: Return immediately instead of monitoring. A new evaluation ID
    31    will be output, which can be used to examine the evaluation using the
    32    [eval status](/docs/commands/eval-status.html) command
    33  
    34  * `-verbose`: Show full information.
    35  
    36  ## Examples
    37  
    38  Revert to an older version of a job:
    39  
    40  ```
    41  $ nomad job history -p example
    42  Version     = 1
    43  Stable      = false
    44  Submit Date = 07/25/17 21:27:30 UTC
    45  Diff        =
    46  +/- Job: "example"
    47  +/- Task Group: "cache"
    48    +/- Task: "redis"
    49      +/- Config {
    50        +/- image:           "redis:3.2" => "redis:4.0"
    51            port_map[0][db]: "6379"
    52          }
    53  
    54  Version     = 0
    55  Stable      = false
    56  Submit Date = 07/25/17 21:27:18 UTC
    57  
    58  $ nomad job revert example 0
    59  ==> Monitoring evaluation "faff5c30"
    60      Evaluation triggered by job "example"
    61      Evaluation within deployment: "e17c8592"
    62      Allocation "4ed0ca3b" modified: node "e8a2243d", group "cache"
    63      Evaluation status changed: "pending" -> "complete"
    64  ==> Evaluation "faff5c30" finished with status "complete"
    65  
    66  $ nomad job history -p example
    67  Version     = 2
    68  Stable      = true
    69  Submit Date = 07/25/17 21:27:43 UTC
    70  Diff        =
    71  +/- Job: "example"
    72  +/- Task Group: "cache"
    73    +/- Task: "redis"
    74      +/- Config {
    75        +/- image:           "redis:4.0" => "redis:3.2"
    76            port_map[0][db]: "6379"
    77          }
    78  
    79  Version     = 1
    80  Stable      = false
    81  Submit Date = 07/25/17 21:27:30 UTC
    82  Diff        =
    83  +/- Job: "example"
    84  +/- Task Group: "cache"
    85    +/- Task: "redis"
    86      +/- Config {
    87        +/- image:           "redis:3.2" => "redis:4.0"
    88            port_map[0][db]: "6379"
    89          }
    90  
    91  Version     = 0
    92  Stable      = false
    93  Submit Date = 07/25/17 21:27:18 UTC
    94  ```