github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/website/content/docs/commands/alloc/restart.mdx (about)

     1  ---
     2  layout: docs
     3  page_title: 'Commands: alloc restart'
     4  sidebar_title: restart
     5  description: |
     6    Restart a running allocation or task
     7  ---
     8  
     9  # Command: alloc restart
    10  
    11  The `alloc restart` command allows a user to perform an in place restart of an
    12  an entire allocation or individual task.
    13  
    14  ## Usage
    15  
    16  ```plaintext
    17  nomad alloc restart [options] <allocation> <task>
    18  ```
    19  
    20  This command accepts a single allocation ID and a task name. The task name must
    21  be part of the allocation and the task must be currently running. The task name
    22  is optional and if omitted every task in the allocation will be restarted.
    23  
    24  When ACLs are enabled, this command requires a token with the
    25  `alloc-lifecycle`, `read-job`, and `list-jobs` capabilities for the
    26  allocation's namespace.
    27  
    28  ## General Options
    29  
    30  @include 'general_options.mdx'
    31  
    32  ## Restart Options
    33  
    34  - `-verbose`: Display verbose output.
    35  
    36  ## Examples
    37  
    38  ```shell-session
    39  $ nomad alloc restart eb17e557
    40  
    41  $ nomad alloc restart eb17e557 foo
    42  Could not find task named: foo, found:
    43  * test
    44  <blocking>
    45  ```