github.com/containers/podman/v5@v5.1.0-rc1/docs/source/markdown/podman-restart.1.md.in (about) 1 % podman-restart 1 2 3 ## NAME 4 podman\-restart - Restart one or more containers 5 6 ## SYNOPSIS 7 **podman restart** [*options*] *container* ... 8 9 **podman container restart** [*options*] *container* ... 10 11 ## DESCRIPTION 12 The restart command allows containers to be restarted using their ID or name. 13 Running containers are stopped and restarted. Stopped containers are started. 14 15 ## OPTIONS 16 17 #### **--all**, **-a** 18 19 Restart all containers regardless of their current state. 20 21 #### **--cidfile** 22 23 Read container ID from the specified file and restart the container. Can be specified multiple times. 24 25 #### **--filter**, **-f**=*filter* 26 27 Filter what containers restart. 28 Multiple filters can be given with multiple uses of the --filter flag. 29 Filters with the same key work inclusive with the only exception being 30 `label` which is exclusive. Filters with different keys always work exclusive. 31 32 Valid filters are listed below: 33 34 | **Filter** | **Description** | 35 |------------|----------------------------------------------------------------------------------| 36 | id | [ID] Container's ID (CID prefix match by default; accepts regex) | 37 | name | [Name] Container's name (accepts regex) | 38 | label | [Key] or [Key=Value] Label assigned to a container | 39 | exited | [Int] Container's exit code | 40 | status | [Status] Container's status: 'created', 'exited', 'paused', 'running', 'unknown' | 41 | ancestor | [ImageName] Image or descendant used to create container | 42 | before | [ID] or [Name] Containers created before this container | 43 | since | [ID] or [Name] Containers created since this container | 44 | volume | [VolumeName] or [MountpointDestination] Volume mounted in container | 45 | health | [Status] healthy or unhealthy | 46 | pod | [Pod] name or full or partial ID of pod | 47 | network | [Network] name or full ID of network | 48 | until | [DateTime] Containers created before the given duration or time. | 49 50 @@option latest 51 52 #### **--running** 53 54 Restart all containers that are already in the *running* state. 55 56 @@option time 57 58 ## EXAMPLES 59 60 Restart the latest container. 61 ``` 62 $ podman restart -l 63 ec588fc80b05e19d3006bf2e8aa325f0a2e2ff1f609b7afb39176ca8e3e13467 64 ``` 65 66 Restart a specific container by partial container ID. 67 ``` 68 $ podman restart ff6cf1 69 ff6cf1e5e77e6dba1efc7f3fcdb20e8b89ad8947bc0518be1fcb2c78681f226f 70 ``` 71 72 Restart two containers by name with a timeout of 4 seconds. 73 ``` 74 $ podman restart --time 4 test1 test2 75 c3bb026838c30e5097f079fa365c9a4769d52e1017588278fa00d5c68ebc1502 76 17e13a63081a995136f907024bcfe50ff532917988a152da229db9d894c5a9ec 77 ``` 78 79 Restart all running containers. 80 ``` 81 $ podman restart --running 82 ``` 83 84 Restart all containers. 85 ``` 86 $ podman restart --all 87 ``` 88 89 Restart container using ID specified in a given files. 90 ``` 91 $ podman restart --cidfile /home/user/cidfile-1 92 $ podman restart --cidfile /home/user/cidfile-1 --cidfile ./cidfile-2 93 ``` 94 95 ## SEE ALSO 96 **[podman(1)](podman.1.md)** 97 98 ## HISTORY 99 March 2018, Originally compiled by Matt Heon <mheon@redhat.com>