Skip to content

restore: add --dry-run and extended progress output#4839

Merged
MichaelEischer merged 5 commits intorestic:masterfrom
MichaelEischer:restore-dry-run
Jul 5, 2024
Merged

restore: add --dry-run and extended progress output#4839
MichaelEischer merged 5 commits intorestic:masterfrom
MichaelEischer:restore-dry-run

Conversation

@MichaelEischer
Copy link
Copy Markdown
Member

@MichaelEischer MichaelEischer commented May 31, 2024

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

Based on #4837 and #4838

Add a --dry-run option for the restore command. Using this option, restore will only work on metadata basis. In addition, the PR introduces a new verbose status output for the restore command. See the docs changes for an example snippet. Other possible line prefixes except restored are skipped (due to --overwrite=...) and unchanged (if the verification of existing files considers a file to be up-to-date).

  • Discuss and polish restore output

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

restore --dry-run has been discussed in various places, including #2796 . However, no details on the log messages have been discussed.

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.

@MichaelEischer MichaelEischer force-pushed the restore-dry-run branch 4 times, most recently from 33553e8 to a9efded Compare June 3, 2024 20:32
@MichaelEischer MichaelEischer mentioned this pull request Jun 29, 2024
8 tasks
@MichaelEischer MichaelEischer force-pushed the restore-dry-run branch 3 times, most recently from e82f34a to a906650 Compare July 5, 2024 18:42
Copy link
Copy Markdown
Member Author

@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

@MichaelEischer MichaelEischer merged commit 83fdcf2 into restic:master Jul 5, 2024
@MichaelEischer MichaelEischer deleted the restore-dry-run branch July 5, 2024 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants