Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite metadata #4573

Merged
merged 11 commits into from Dec 24, 2023
Merged

Rewrite metadata #4573

merged 11 commits into from Dec 24, 2023

Conversation

gab50000
Copy link
Contributor

@gab50000 gab50000 commented Nov 26, 2023

What does this PR change? What problem does it solve?

This PR allows to rewrite the host and time metadata of a snapshot.

Was the change previously discussed in an issue or on the forum?

Related to #2654

Checklist

  • I have read the contribution guidelines.
  • I have enabled maintainer edits.
  • I have added tests for all code changes.
  • I have added documentation for relevant changes (in the manual).
  • There's a new file in changelog/unreleased/ that describes the changes for our users (see template).
  • I have run gofmt on the code in all commits.
  • All commit messages are formatted in the same style as the other commits in the repo.
  • I'm done! This pull request is ready for review.

@gab50000 gab50000 changed the title Rewrite time Rewrite metadata Nov 26, 2023
@gab50000 gab50000 force-pushed the rewrite_time branch 3 times, most recently from 22983a4 to 6b429b9 Compare November 27, 2023 21:15
@gab50000 gab50000 marked this pull request as ready for review November 27, 2023 21:15
@moritzdietz
Copy link
Contributor

Funnily I thought about this exact use case the other day…!

Adds

  * snapshotMetadataArgs, which holds the new metadata as strings parsed from
    the command line

  * snapshotMetadata, which holds the new metadata converted to the
    correct types
@MichaelEischer MichaelEischer force-pushed the rewrite_time branch 2 times, most recently from 7ff5c1b to 405bfc5 Compare December 24, 2023 14:05
Copy link
Member

@MichaelEischer MichaelEischer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I've added a few cleanup commits and rebased the PR.

@MichaelEischer MichaelEischer added this pull request to the merge queue Dec 24, 2023
Merged via the queue into restic:master with commit 23e1b4b Dec 24, 2023
12 checks passed
cmd/restic/cmd_rewrite.go Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants