Winfried Plappert
8c968c32ab
Merge c774c53583
into de9a040d27
2025-03-07 18:04:22 +00:00
Winfried Plappert
c774c53583
internal/checker: added tests
...
checker.go: added error message if 'selectedTrees' is empty
checker_test.go: modified test checking using test.OK() and test.Assert() to
make the checking more compact.
2025-03-07 18:01:33 +00:00
Winfried Plappert
2707cb416e
restic check - add integration tests
...
cmd_check.go - minor changes: changes error meesage to New instead of Fatal
added a short description in the help text.
cmd_check_integration_test.go: added two tests which should both fail:
invalid input
2025-03-07 17:57:33 +00:00
Michael Eischer
de9a040d27
Merge pull request #5256 from abaumg/fix/links-to-backblaze-documentation
...
Fix links to Backblaze documentation
2025-02-23 21:06:28 +01:00
Andreas Baumgartner
89826ef5ce
doc: fix links to Backblaze documentation
2025-02-21 23:43:02 +01:00
Winfried Plappert
b5c371892b
check: harmonize my branch with master - integrate checkSummary
...
based on the change in runCheck return values the following functions have been afftected
cmd/restic/cmd_check_integration_test.go
cmd/restic/cmd_migrate.go
cmd/restic/cmd_prune_integration_test.go
cmd/restic/integration_test.go
check - corrected rebase error by not removing obsolete code.
the check for the filter if len(args) > 0 { ... } is obsolete and has been replaced by
if len(args) > 0 || !opts.SnapshotFilter.Empty() { ... }
2025-02-18 07:44:54 +00:00
Winfried Plappert
7fe83f0db0
check: cmd_check, checker, checker_test: added test - rebase part 5: add checker_test
...
cmd_check, checker: added error return
checker_test: testing CheckWithSnapshots
checker_test: fixed lint error for empty tree list
2025-02-18 07:44:54 +00:00
Winfried Plappert
c0e5a74774
check with snapshot filter: check early for filter errors - rebase part 4
...
Hand down filtered tree IDs to CheckWithSnapshots which builds 'usedBlobs'.
repo.LookupBlob is used to derive packfiles from 'usedBlobs' and constructs
'snapPacks' and overwrites c.packs.
2025-02-18 07:44:54 +00:00
Winfried Plappert
3b05529334
check - rebase part 3 - add documentation and file issue-3326
...
add documentation for checking via snapshot filter.
cmd_check: change 1st line of issue-3326 to recognized format.
check with snapshot filter: changed issue description
2025-02-18 07:44:54 +00:00
Winfried Plappert
5e11147311
restic check with snapshots
...
fixed lint errors
2025-02-18 07:44:54 +00:00
Winfried Plappert
c141ed1a17
restic check with snapshot list
...
reworked the code using snapshotFilter.FindAll to find all snapshots and
restic.FindUsedBlobs to retrieve all used blobs.
range repo.LookupBlob (as before) to convert the blobs to their containing packfiles
and c.repo.List(ctx, restic.PackFile, ...) to retrieve the sizes of those packfiles.
Additional documentation and tests are still outstanding.
2025-02-18 07:44:54 +00:00
Winfried Plappert
46184bd703
check: run check of packfiles filtered via snapshotfilter - rebase part 2
...
Added code for selecting multiple snapshots.
Added message how many packfiles and their cumulative size were selected.
In internal/checker/checker.go replaced the datablob / packfile selection from using walker.Walk
to restic.StreamTrees - parallelizing the packfile selection.
resolved conflict in cmd_check: allow check for snapshot filter
2025-02-18 07:44:54 +00:00
Winfried Plappert
6f77d4ddf8
check: enable --read-data-* for specified snapshots - rebase step 1
...
Add code to cmd/restic/cmd_check.go to detect snapshots
Resolved conflict for cmd/restic/cmd_check.go - runCheck
integrated newCheckCommand(...)
2025-02-18 07:44:09 +00:00
Michael Eischer
5ddda7f5e9
Merge pull request #5242 from MichaelEischer/fix-read-stdin-msg
...
print password from stdin message only to terminal
2025-02-16 18:29:34 +01:00
Michael Eischer
8c12291f56
Merge pull request #5241 from MichaelEischer/cleanup-cli
...
Refactor CLI command initialization to use less global state
2025-02-16 18:28:48 +01:00
Michael Eischer
5190933561
Merge pull request #5240 from MichaelEischer/better-json-docs
...
Improve JSON output type documentation
2025-02-16 18:28:29 +01:00
Michael Eischer
00e69f242e
docs: fix datatypes
2025-02-16 18:17:22 +01:00
Michael Eischer
0c4e65228a
refactor secondary options
2025-02-07 21:29:33 +01:00
Michael Eischer
120bd08c0d
move globalOptions initialization into method
2025-02-07 21:29:33 +01:00
Michael Eischer
d378a171c8
cleanup backend initialization
2025-02-07 21:29:33 +01:00
Michael Eischer
c752867f0a
fix linter errors
2025-02-07 21:29:33 +01:00
Michael Eischer
412d6d9ec5
Create root command via function
2025-02-07 21:29:33 +01:00
Michael Eischer
5497217018
print password from stdin message only to terminal
2025-02-07 20:54:18 +01:00
Michael Eischer
aa9cdf93cf
refactor persistent options to be applied via functions
2025-02-07 19:03:46 +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
Michael Eischer
4e58902de6
doc: fix broken links
2025-02-06 20:59:36 +01:00
Michael Eischer
39823c5f6c
doc: deprecate short_id and add some missing fields
2025-02-06 20:53:01 +01:00
Michael Eischer
421842f41f
doc: add datatypes to JSON outputs
2025-02-06 20:10:42 +01:00
Michael Eischer
59b7007534
doc: reformat scripting tables
2025-02-06 19:46:41 +01:00
Michael Eischer
da47967316
Merge pull request #5194 from darkdragon-001/json-check
...
Json check
2025-02-05 22:15:10 +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
9cdf91b406
Merge pull request #5235 from MichaelEischer/refactor-ls-sorting
...
Refactor ls sorting
2025-02-05 20:44:08 +01:00
Winfried Plappert
4104a8e6a5
Issue: 4942: cmd_rewrite: add snapshot summary data to an existing snapshot. ( #5185 )
...
Co-authored-by: Michael Eischer <michael.eischer@fau.de>
2025-02-05 20:40:20 +01:00
Michael Eischer
6cc06e0812
ls: add missing error handling
2025-02-03 22:15:59 +01:00
Michael Eischer
c32613a624
ls: extract comparator
2025-02-03 22:15:59 +01:00
Michael Eischer
1807627dda
ls: refactor sorting into sortedPrinter struct
2025-02-03 22:15:59 +01:00
Michael Eischer
993eb112cd
ls: deduplicate sorting test
2025-02-03 22:15:54 +01:00
Michael Eischer
36d8916354
ls: use numeric based enum for SortMode
2025-02-03 22:11:46 +01:00
Winfried Plappert
060a44202f
ls: sort output by size, atime, ctime, mtime, time(=mtime), extension ( #5182 )
...
Enhancement: create ability to sort output of restic ls -l by
name, size, atime, ctime, mtime, time(=mtime), X(=extension), extension
---------
Co-authored-by: Michael Eischer <michael.eischer@fau.de>
2025-02-03 22:07:04 +01:00
Michael Eischer
d79681b987
Merge pull request #5223 from restic/dependabot/go_modules/google.golang.org/api-0.219.0
...
build(deps): bump google.golang.org/api from 0.204.0 to 0.219.0
2025-02-03 21:32:15 +01:00
dependabot[bot]
90e2c419e4
build(deps): bump google.golang.org/api from 0.204.0 to 0.219.0
...
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client ) from 0.204.0 to 0.219.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases )
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md )
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.204.0...v0.219.0 )
---
updated-dependencies:
- dependency-name: google.golang.org/api
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2025-02-03 20:16:08 +00:00
Michael Eischer
7ab5bb6df4
Merge pull request #5232 from MichaelEischer/bump-go-version
...
Bump minimum go version to 1.22
2025-02-03 21:14:57 +01:00
Michael Eischer
efd2ec086f
Merge pull request #5179 from zmanda/fix-gh-5140-forget-reports-incorrect-number-of-files-deleted
...
forget: report count of deleted files correctly
2025-02-02 20:14:15 +01:00
Srigovind Nayak
8d970e36cf
tests: add unit test to check the progress counter for forget/prune
2025-02-02 20:18:56 +05:30
Srigovind Nayak
58f58a995d
parallel: increment progress bar before report function which may absorb the error
...
* sometimes, the report function may absorb the error and return nil, in those cases the bar.Add(1) method would execute even if the file deletion had failed
2025-02-02 19:45:36 +05:30
Michael Eischer
d71ddfb89b
bump minimum go version to 1.22
2025-02-02 15:05:47 +01:00