Commit Graph
134 Commits
Author SHA1 Message Date
Michael Eischer e8ed2434cd ui: move NewProgressPrinter to ui/progress.NewTerminalPrinter 2026-06-13 16:53:54 +02:00
Michael Eischer ccddc1914d repository: rename PackError to ErrPackMetadata 2026-06-10 22:20:28 +02:00
Michael Eischer 78b3411076 check: consider split pack index entries as repository damage 2026-05-31 15:58:33 +02:00
Michael Eischer 496ea804a6 check/dump/mount/repair/rewrite: update command description 2026-05-20 22:45:52 +02:00
86ccc6d445 Bugfix: restic check: add missing finalizeSnapshotFilter() (#5644)
add missing finalizeSnapshotFilter() to cmd.RunE()

---------

Co-authored-by: Michael Eischer <michael.eischer@fau.de>
2026-01-26 21:08:15 +00:00
ce57961f14 restic check with snapshot filters (#5469)
---------

Co-authored-by: Michael Eischer <michael.eischer@fau.de>
2025-11-28 19:12:38 +00:00
Michael Eischer a816b827cf extract GlobalOptions into internal/global package
Rough steps:
```
mv cmd/restic/global* cmd/restic/secondary_repo* internal/global/
sed -i "s/package main/package global/" internal/global/*.go
Rename "GlobalOptions" to "Options" in internal/global/
Replace everywhere " GlobalOptions" -> " global.Options"
Replace everywhere "\*GlobalOptions" -> " *global.Options"
Make SecondaryRepoOptions public
Make create public
Make version public
```
2025-10-12 17:56:28 +02:00
Michael Eischer 2c677d8db4 global: make private fields public 2025-10-12 17:56:28 +02:00
Michael Eischer b7bbb408ee check: refactor pack selection for read data
Drop the `packs` map from the internal state of the checker. Instead the
Packs(...) method now calls a filter callback that can select the
packs intended for checking.
2025-10-03 23:45:05 +02:00
Michael Eischer 82971ad7f0 check: split index/pack check into repository package 2025-10-03 19:34:32 +02:00
Michael Eischer 52eb66929f repository: deduplicate index progress bar initializaton 2025-10-03 18:55:46 +02:00
Michael Eischer e753941ad3 move NewProgressPrinter to ui package 2025-10-03 18:55:46 +02:00
Michael Eischer 3410808dcf deduplicate termstatus setup 2025-10-03 18:55:46 +02:00
Michael Eischer 1ae2d08d1b termstatus: centralize OutputIsTerminal checks 2025-10-03 18:55:46 +02:00
Michael Eischer 6b5c8ce14e change run* functions to accept ui.Terminal instead of *termstatus.Terminal 2025-09-15 22:37:25 +02:00
Michael Eischer c14cf48776 further reduce Warnf usages 2025-09-15 22:35:16 +02:00
Michael Eischer 109a211fbe convert repository locking to use termstatus 2025-09-15 22:34:59 +02:00
Michael Eischer 32b7168a9e centralize index progress bar for termstatus 2025-09-15 20:25:17 +02:00
Michael Eischer 6cdb9a75e6 consider JSON flag in newTerminalProgressPrinter 2025-09-15 20:25:17 +02:00
Srigovind Nayak debb110a7c check: add percentage of repository checked 2025-05-03 18:08:12 +05:30
Michael Eischer f7f48b3026 ui/progress: extend Printer interface with print to stdout method 2025-03-23 17:46:04 +01:00
Michael Eischer 412d6d9ec5 Create root command via function 2025-02-07 21:29:33 +01:00
Michael Eischer aacd6a47e3 refactor to use constructor functions to create cobra commands
This allows getting rid of the global options variables
2025-02-07 18:56:45 +01:00
Michael Eischer dc9b6378f3 move cli flags into AddFlags on option structs 2025-02-06 22:10:41 +01:00
Dark Dragon 49a411f7ac Print JSON summary in all error cases 2025-02-05 22:08:06 +01:00
Dark Dragon 7cc1aa0cd4 Add check summary 2025-02-05 22:08:06 +01:00
Dark Dragon a58a8f2ce0 Add JSON output to check command 2025-02-05 22:08:05 +01:00
Dark Dragon 79d435efb1 Use printer.NewCounter() instead of newTerminalProgressMax()
where possible (max is unknown).
2025-02-05 22:07:47 +01:00
Michael Eischer 24f4e780f1 backend: consistently use os package for filesystem access
The go std library should be good enough to manage the files in the
backend and cache folders.
2024-08-31 18:20:40 +02:00
Michael Eischer 6024597028 drop support for s3legacy layout 2024-08-31 17:25:24 +02:00
Michael Eischer 943b6ccfba index: remove support for legacy index format 2024-08-31 17:12:43 +02:00
Michael Eischer 5988d825b7 group commands and make features/options visible 2024-08-23 23:48:45 +02:00
Michael Terry 56f28c9bd5 main: return an exit code (12) for "bad password" errors 2024-08-15 16:55:45 -04:00
Michael Eischer 94fdca08c4 return exit code 10 if repository does not exist 2024-07-10 21:46:26 +02:00
Michael Eischer d76a78aa99 return exit code 11 if the repository could not be locked 2024-07-10 21:37:32 +02:00
Michael Eischer 3b7228c8c1 explicitly document exit code 1 on error 2024-07-10 21:35:46 +02:00
Michael Eischer fdc7349aa4 check: improve error on damaged index
Always return the `repository contains errors` message if a repository
is damaged and must be repaired. Also provide specific instructions how
to repair the index.
2024-07-05 20:04:25 +02:00
Michael Eischer 879ba07a87 check: only show additional files if verbose output is enabled
Additional files are nearly always caused by interrupted backup runs.
This is unproblematic, thus don't pollute the check output with it.
2024-07-05 20:04:25 +02:00
Michael Eischer 6d9dfff1cb check: point users towards the troubleshooting guide if repo has errors 2024-07-05 20:04:25 +02:00
Michael Eischer c9a4a95848 check: suggest using repair packs to repair truncated pack files
Previously, that help message was only shown for running `check
--read-data`.
2024-07-05 20:04:25 +02:00
Michael Eischer da338d5aa8 check: tweak wording of repair packs message
By now, the message is also shown for truncated or otherwise damaged pack
files, not just those with corrupted blobs.
2024-07-05 20:04:25 +02:00
Michael Eischer 1671a3fe2e check: hide message about additional files if error in repo
The message says "[...] addition files were found [...]. This is
non-critical [...]". Unless users are highly experienced with restic,
it's hard to correctly interpret what "This" refers to. Thus, just hide
the message if there is a real problem.
2024-07-05 20:04:25 +02:00
Michael Eischer b1250eead9 check: mark s3legacy layout and legacy indexes are error 2024-07-05 20:04:25 +02:00
Michael Eischer ce0cbc7a36 check: fix cachedir creation when using default location 2024-06-30 12:04:57 +02:00
Michael Eischer 13127f3f6b check: remove output mangling workaround 2024-05-30 15:09:27 +02:00
Michael Eischer 939b537c80 check/migrate: convert to use termstatus to prevent mangled output
Errors reported by check would result in corrupted output.
2024-05-30 15:09:27 +02:00
Michael EischerandGitHub 52b3fee42b Merge pull request #4818 from MichaelEischer/move-code
Move cache / index / hashing / pack packages
2024-05-30 13:54:31 +02:00
Shivashis Padhi 0271bb97f8 check: enhance check command to create cache directory if it doesn't exist 2024-05-25 19:15:42 +05:30
Michael Eischer 8e5d7d719c cache: move to backend package 2024-05-24 23:04:06 +02:00
Michael Eischer 94e863885c check: move verification of individual pack file to repository 2024-05-18 21:42:50 +02:00