.\" This file was generated by help2man 1.47.16, with human revise .TH ETCDCTL "1" "October 2020" "3.3.25" "User Commands" .SH "NAME" etcdctl \- A simple command line client for etcd. .SH "WARNING" Set environment variable ETCDCTL_API=3 to use v3 API or ETCDCTL_API=2 to use v2 API. .SH "USAGE" etcdctl [options] command [command options] [arguments...] .SH "COMMANDS V3" .TP alarm disarm Disarms all alarms .TP alarm list Lists all alarms .TP auth disable Disables authentication .TP auth enable Enables authentication .TP check perf Check the performance of the etcd cluster .TP compaction Compacts the event history in etcd .TP defrag Defragments the storage of the etcd members with given endpoints .TP del Removes the specified key or range of keys [key, range_end) .TP elect Observes and participates in leader election .TP endpoint hashkv Prints the KV history hash for each endpoint in \fB\-\-endpoints\fR .TP endpoint health Checks the healthiness of endpoints specified in `\-\-endpoints` flag .TP endpoint status Prints out the status of endpoints specified in `\-\-endpoints` flag .TP get Gets the key or a range of keys .TP help Help about any command .TP lease grant Creates leases .TP lease keep\-alive Keeps leases alive (renew) .TP lease list List all active leases .TP lease revoke Revokes leases .TP lease timetolive Get lease information .TP lock Acquires a named lock .TP make\-mirror Makes a mirror at the destination etcd cluster .TP member add Adds a member into the cluster .TP member list Lists all members in the cluster .TP member remove Removes a member from the cluster .TP member update Updates a member in the cluster .TP migrate Migrates keys in a v2 store to a mvcc store .TP move\-leader Transfers leadership to another etcd cluster member. .TP put Puts the given key into the store .TP role add Adds a new role .TP role delete Deletes a role .TP role get Gets detailed information of a role .TP role grant\-permission Grants a key to a role .TP role list Lists all roles .TP role revoke\-permission Revokes a key from a role .TP snapshot restore Restores an etcd member snapshot to an etcd directory .TP snapshot save Stores an etcd node backend snapshot to a given file .TP snapshot status Gets backend snapshot status of a given file .TP txn Txn processes all the requests in one transaction .TP user add Adds a new user .TP user delete Deletes a user .TP user get Gets detailed information of a user .TP user grant\-role Grants a role to a user .TP user list Lists all users .TP user passwd Changes password of user .TP user revoke\-role Revokes a role from a user .TP version Prints the version of etcdctl .TP watch Watches events stream on keys or prefixes .SH "OPTIONS V3" .TP \fB\-\-cacert=\fR"" verify certificates of TLS\-enabled secure servers using this CA bundle .TP \fB\-\-cert=\fR"" identify secure client using this TLS certificate file .TP \fB\-\-command\-timeout\fR=\fI\,5s\/\fR timeout for short running command (excluding dial timeout) .TP \fB\-\-debug\fR[=\fI\,false\/\fR] enable client\-side debug logging .TP \fB\-\-dial\-timeout\fR=\fI\,2s\/\fR dial timeout for client connections .TP \fB\-d\fR, \fB\-\-discovery\-srv=\fR"" domain name to query for SRV records describing cluster endpoints .TP \fB\-\-endpoints\fR=\fI\,[127\/\fR.0.0.1:2379] gRPC endpoints .TP \fB\-h\fR, \fB\-\-help\fR[=\fI\,false\/\fR] help for etcdctl .TP \fB\-\-hex\fR[=\fI\,false\/\fR] print byte strings as hex encoded strings .TP \fB\-\-insecure\-discovery\fR[=\fI\,true\/\fR] accept insecure SRV records describing cluster endpoints .TP \fB\-\-insecure\-skip\-tls\-verify\fR[=\fI\,false\/\fR] skip server certificate verification (CAUTION: this option should be enabled only for testing purposes) .TP \fB\-\-insecure\-transport\fR[=\fI\,true\/\fR] disable transport security for client connections .TP \fB\-\-keepalive\-time\fR=\fI\,2s\/\fR keepalive time for client connections .TP \fB\-\-keepalive\-timeout\fR=\fI\,6s\/\fR keepalive timeout for client connections .TP \fB\-\-key=\fR"" identify secure client using this TLS key file .TP \fB\-\-user=\fR"" username[:password] for authentication (prompt if password is not supplied) .TP \fB\-w\fR, \fB\-\-write\-out=\fR"simple" set the output format (fields, json, protobuf, simple, table) .SH "COMMANDS V2" .TP backup backup an etcd directory .TP cluster\-health check the health of the etcd cluster .TP mk make a new key with a given value .TP mkdir make a new directory .TP rm remove a key or a directory .TP rmdir removes the key if it is an empty directory or a key\-value pair .TP get retrieve the value of a key .TP ls retrieve a directory .TP set set the value of a key .TP setdir create a new directory or update an existing directory TTL .TP update update an existing key with a given value .TP updatedir update an existing directory .TP watch watch a key for changes .TP exec\-watch watch a key for changes and exec an executable .TP member member add, remove and list subcommands .TP user user add, grant and revoke subcommands .TP role role add, grant and revoke subcommands .TP auth overall auth controls .TP help, h Shows a list of commands or help for one command .SH "OPTIONS V2" .TP \fB\-\-debug\fR output cURL commands which can be used to reproduce the request .TP \fB\-\-no\-sync\fR don't synchronize cluster information before sending request .TP \fB\-\-output\fR simple, \fB\-o\fR simple output response in the given format (simple, `extended` or `json`) (default: "simple") .TP \fB\-\-discovery\-srv\fR value, \fB\-D\fR value domain name to query for SRV records describing cluster endpoints .TP \fB\-\-insecure\-discovery\fR accept insecure SRV records describing cluster endpoints .TP \fB\-\-peers\fR value, \fB\-C\fR value DEPRECATED \- "\-\-endpoints" should be used instead .TP \fB\-\-endpoint\fR value DEPRECATED \- "\-\-endpoints" should be used instead .TP \fB\-\-endpoints\fR value a comma\-delimited list of machine addresses in the cluster (default: "http://127.0.0.1:2379,http://127.0.0.1:4001") .TP \fB\-\-cert\-file\fR value identify HTTPS client using this SSL certificate file .TP \fB\-\-key\-file\fR value identify HTTPS client using this SSL key file .TP \fB\-\-ca\-file\fR value verify certificates of HTTPS\-enabled servers using this CA bundle .TP \fB\-\-username\fR value, \fB\-u\fR value provide username[:password] and prompt if password is not supplied. .TP \fB\-\-timeout\fR value connection timeout per request (default: 2s) .TP \fB\-\-total\-timeout\fR value timeout for the command execution (except watch) (default: 5s) .TP \fB\-\-help\fR, \fB\-h\fR show help .TP \fB\-\-version\fR, \fB\-v\fR print the version .SH "SEE ALSO" \fBectd\fR(1)