Skip to content

Backport - NET 1594 - Snapshot Agent Filename Should Include Consul Version / Da…#18661

Closed
asheshvidyut wants to merge 2 commits intorelease/1.14.xfrom
NET-1594-backport-1.14.x
Closed

Backport - NET 1594 - Snapshot Agent Filename Should Include Consul Version / Da…#18661
asheshvidyut wants to merge 2 commits intorelease/1.14.xfrom
NET-1594-backport-1.14.x

Conversation

@asheshvidyut
Copy link
Contributor

@asheshvidyut asheshvidyut commented Sep 4, 2023

Description

Adds flag -append-filename (which works on values version, dc, node and status) to consul snapshot save command.
Adding the flag -append-filename version,dc,node,status will add consul version, consul datacenter, node name and leader/follower
(status) in the file name given in the snapshot save command before the file extension.

Testing & Reproduction steps

CI
Manual Testing -
make dev
./bin/consul agent -dev

asheshvidyut@asheshvidyut-H2GX766V9T ~/test » ~/consul/bin/consul snapshot save -append-filename node,status,version,dc backup.tgz
Saved and verified snapshot to index 58
asheshvidyut@asheshvidyut-H2GX766V9T ~/test » ls
backup-1.17.0-dc1-asheshvidyut-H2GX766V9T-leader.tgz

Links

PR Checklist

  • updated test coverage
  • external facing docs updated
  • appropriate backport labels added
  • not a security concern

…tacenter (#18625)

* init

* tests added and few fixes

* revert arg message

* changelog added

* removed var declaration

* fix CI

* fix test

* added node name and status

* updated save.mdx

* added example

* fix tense

* fix description
@github-actions github-actions bot added type/docs Documentation needs to be created/updated/clarified theme/cli Flags and documentation for the CLI interface labels Sep 4, 2023
@asheshvidyut asheshvidyut marked this pull request as ready for review September 4, 2023 07:00
@asheshvidyut asheshvidyut requested a review from a team as a code owner September 4, 2023 07:00
@hc-github-team-consul-core
Copy link
Collaborator

🤔 This PR has changes in the website/ directory but does not have a type/docs-cherrypick label. If the changes are for the next version, this can be ignored. If they are updates to current docs, attach the label to auto cherrypick to the stable-website branch after merging.

@asheshvidyut asheshvidyut changed the title NET 1594 - Snapshot Agent Filename Should Include Consul Version / Da… Backport - NET 1594 - Snapshot Agent Filename Should Include Consul Version / Da… Sep 4, 2023
@asheshvidyut asheshvidyut enabled auto-merge (squash) September 4, 2023 07:01
@github-actions github-actions bot deleted the NET-1594-backport-1.14.x branch August 29, 2025 06:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr/no-backport theme/cli Flags and documentation for the CLI interface type/docs Documentation needs to be created/updated/clarified

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants