From 77453c5c7778a95b9377f71b235587ea7f3e186e Mon Sep 17 00:00:00 2001 From: Brian Downs Date: Wed, 30 Jun 2021 14:36:32 -0700 Subject: [PATCH 1/2] add etcd subcommand info Signed-off-by: Brian Downs --- .../k3s/latest/en/backup-restore/_index.md | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/content/k3s/latest/en/backup-restore/_index.md b/content/k3s/latest/en/backup-restore/_index.md index ca6aa53ab1a..1cbc2dd1fa2 100644 --- a/content/k3s/latest/en/backup-restore/_index.md +++ b/content/k3s/latest/en/backup-restore/_index.md @@ -101,3 +101,41 @@ k3s server \ --etcd-s3-access-key= \ --etcd-s3-secret-key= ``` + +### Etcd Snapshot and Restore Subcommands + +k3s supports a set of subcommands for working with your etcd snapshots. + +| Subcommand | Description | +| ----------- | --------------- | +| delete | Delete given snapshot(s) | +| ls, list, l | List snapshots | +| prune | Remove snapshots that exceed the configured retention count | +| save | Trigger an immediate etcd snapshot | + +*note* The `save` subcommand is the same as `k3s etcd-snapshot`. The latter will eventually be deprecated in favor of the former. + +These command will perform as expected whether the etcd snapshots are stored locally or in an S3 compatible object store. + +For additional information on the etcd snapshot subcommands, run `k3s etcd-snapshot + +Delete a snapshot from S3. + +``` +k3s etcd-snapshot delete \ + --s3 \ + --s3-bucket= \ + --s3-access-key= \ + --s3-secret-key= \ + +``` + +Prune local snapshots with the default retention policy (5). The `prune` subcommand takes an additional flag `--snapshot-retention` that allows for overriding the default retention policy. + +``` +k3s etcd-snapshot prune +``` + +``` +k3s etcd-snapshot prune --snapshot-retention 10 +``` From caae0f63b51b523fe06140da11c8a2cc648584ff Mon Sep 17 00:00:00 2001 From: Brian Downs Date: Wed, 30 Jun 2021 15:34:10 -0700 Subject: [PATCH 2/2] pr remediations Signed-off-by: Brian Downs --- content/k3s/latest/en/backup-restore/_index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/k3s/latest/en/backup-restore/_index.md b/content/k3s/latest/en/backup-restore/_index.md index 1cbc2dd1fa2..21734573e14 100644 --- a/content/k3s/latest/en/backup-restore/_index.md +++ b/content/k3s/latest/en/backup-restore/_index.md @@ -115,9 +115,9 @@ k3s supports a set of subcommands for working with your etcd snapshots. *note* The `save` subcommand is the same as `k3s etcd-snapshot`. The latter will eventually be deprecated in favor of the former. -These command will perform as expected whether the etcd snapshots are stored locally or in an S3 compatible object store. +These commands will perform as expected whether the etcd snapshots are stored locally or in an S3 compatible object store. -For additional information on the etcd snapshot subcommands, run `k3s etcd-snapshot +For additional information on the etcd snapshot subcommands, run `k3s etcd-snapshot`. Delete a snapshot from S3.