oc-adm-migrate-storage man page

oc adm migrate storage — Update the stored version of API objects

Synopsis

oc adm migrate storage [Options]

Description

Migrate internal object storage via update

This command invokes an update operation on every API object reachable by the caller. This forces the server to write to the underlying storage if the object representation has changed. Use this command to ensure that the most recent storage changes have been applied to all objects (storage version, storage encoding, any newer object defaults).

To operate on a subset of resources, use the --include flag. If you encounter errors during a run the command will output a list of resources that received errors, which you can then re-run the command on. You may also specify --from-key and --to-key to restrict the set of resource names to operate on (key is NAMESPACE/NAME for resources in namespaces or NAME for cluster scoped resources). --from-key is inclusive if specified, while --to-key is exclusive.

By default, events are not migrated since they expire within a very short period of time. If you have significantly increased the expiration time of events, run a migration with --include=events

WARNING: This is a slow command and will put significant load on an API server. It may also
result in significant intra-cluster traffic.

Options

--all-namespaces=true
Migrate objects in all namespaces. Defaults to true.
--confirm=false
If true, all requested objects will be migrated. Defaults to false.
-f, --filename=[]
Filename, directory, or URL to docker-compose.yml file to use
--from-key=""
If specified, only migrate items with a key (namespace/name or name) greater than or equal to this value
--include=[*]
Resource types to migrate. Passing --filename will override this flag.
-o, --output=""
Output the modified objects instead of saving them, valid values are 'yaml' or 'json'
--to-key=""
If specified, only migrate items with a key (namespace/name or name) less than this value

Options Inherited from Parent Commands

--api-version=""
DEPRECATED: The API version to use when talking to the server

--as=""
Username to impersonate for the operation.

--certificate-authority=""
Path to a cert. file for the certificate authority.

--client-certificate=""
Path to a client certificate file for TLS.

--client-key=""
Path to a client key file for TLS.

--cluster=""
The name of the kubeconfig cluster to use

--config=""
Path to the config file to use for CLI requests.

--context=""
The name of the kubeconfig context to use

--google-json-key=""
The Google Cloud Platform Service Account JSON Key to use for authentication.

--insecure-skip-tls-verify=false
If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.

--log-flush-frequency=0
Maximum number of seconds between log flushes

--match-server-version=false
Require server version to match client version

-n, --namespace=""
If present, the namespace scope for this CLI request.

--server=""
The address and port of the Kubernetes API server

--token=""
Bearer token for authentication to the API server.

--user=""
The name of the kubeconfig user to use

Example

# Perform a dry-run of updating all objects
oc adm migrate storage

# To actually perform the update, the confirm flag must be appended
oc adm migrate storage --confirm

# Only migrate pods
oc adm migrate storage --include=pods --confirm

# Only pods that are in namespaces starting with "bar"
oc adm migrate storage --include=pods --confirm --from-key=bar/ --to-key=bar/\xFF

See Also

oc-adm-migrate(1),

History

June 2016, Ported from the Kubernetes man-doc generator

Referenced By

oc-adm-migrate(1).

Openshift CLI User Manuals Openshift June 2016