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
394c8de502
add package to create a prepopulated backend registry
2025-10-12 17:56:28 +02:00
Michael Eischer
a632f490fa
Merge pull request #5550 from MichaelEischer/refactor-check-data-selection
...
check: refactor pack selection for read data
2025-10-12 17:51:00 +02:00
Srigovind Nayak
481fcb9ca7
backup: return exit code 3 if not all targets are available ( #5347 )
...
to make the exit code behaviour consistent with files inaccessible during the backup phase, making this change to exit with code 3 if not all target files/folders are accessible for backup
---------
Co-authored-by: Michael Eischer <michael.eischer@fau.de >
2025-10-05 15:38:52 +02:00
Srigovind Nayak
22f254c9ca
feat: allow override env RESTIC_HOST with flag to filter all snapshots ( #5541 )
2025-10-05 13:22:50 +02:00
Winfried Plappert
a2a49cf784
list integration test: error scanning 'restic list blobs' ( #5311 )
...
Co-authored-by: Michael Eischer <michael.eischer@fau.de >
2025-10-04 12:18:32 +00: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
56ac8360c7
data: split node and snapshot code from restic package
2025-10-03 19:10:39 +02:00
Michael Eischer
3335f62a8f
Fix linter warnings
2025-10-03 18:55:46 +02:00
Michael Eischer
711194276c
remove unused printer from ReadPassword
2025-10-03 18:55:46 +02:00
Michael Eischer
52eb66929f
repository: deduplicate index progress bar initializaton
2025-10-03 18:55:46 +02:00
Michael Eischer
76b2cdd4fb
replace globalOptions.stdout with termstatus.OutputWriter
2025-10-03 18:55:46 +02:00
Michael Eischer
c293736841
drop unused stderr from GlobalOptions
2025-10-03 18:55:46 +02:00
Michael Eischer
1939cff334
restore: embed progress.Printer in restore-specific printer
2025-10-03 18:55:46 +02:00
Michael Eischer
1a76f988ea
backup: embed progress.Printer in backup specific printer
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
ff5a0cc851
termstatus: fully wrap reading password from terminal
2025-10-03 18:55:46 +02:00
Michael Eischer
013c565c29
standardize shorten variable name for GlobalOptions to gopts
2025-10-03 18:55:46 +02:00
Michael Eischer
96af35555a
termstatus: add stdin and inject into backup command
2025-10-03 18:55:46 +02:00
Michael Eischer
ca5b0c0249
get rid of fmt.Print* usages
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
4dc71f24c5
backends: pass error logger to backends
2025-10-03 18:22:42 +02:00
Michael Eischer
13f743e26b
profiling: inject os.Stderr instead of directly using it
2025-10-03 18:22:42 +02:00
Michael Eischer
3e1632c412
reduce os.stdout / os.stderr usage in tests
2025-10-03 18:22:42 +02:00
Michael Eischer
6bd85d2412
reduce usages of globalOptions variable
2025-10-03 18:22:42 +02:00
Michael Eischer
d491c1bdbf
use errors.Fatalf instead of custom formatting
2025-09-24 22:11:54 +02:00
Michael Eischer
97933d1404
remove trailing newlines from errors.Fatalf calls
2025-09-24 22:11:34 +02:00
Michael Eischer
4edfd36c8f
Merge pull request #5363 from zmanda/fix-gh-5258-backup-exits-with-wrong-code-on-ctrl-c
...
bugfix: fatal errors do not keep underlying error
2025-09-24 22:04:38 +02:00
Michael Eischer
7257cd2e5f
extra linters
2025-09-21 22:24:35 +02:00
Michael Eischer
88bdf20bd8
Reduce linter ignores
2025-09-21 22:24:27 +02:00
Michael Eischer
60d80a6127
Fix linter warnings
2025-09-21 22:24:15 +02:00
Michael Eischer
f091e6aed0
Merge branch 'patch-release'
2025-09-21 21:20:56 +02:00
Alexander Neumann
39a737fe14
Set development version for 0.18.1
2025-09-21 20:05:01 +02:00
Alexander Neumann
7d0aa7f2e3
Add version for 0.18.1
2025-09-21 20:04:58 +02:00
Michael Eischer
2fe271980f
backup: only pass error log function to helpers
2025-09-21 16:02:59 +02:00
Michael Eischer
4f1390436d
init: remove duplication from error message
2025-09-21 15:58:29 +02:00
Michael Eischer
2d7611373e
ignore JSON flag for fully unsupported commands
...
Considering the flag would result in a mostly empty terminal output,
which is probably worse than text output instead of JSON.
2025-09-21 15:38:29 +02:00
Michael Eischer
f71278138f
drop warnf
2025-09-18 22:58:23 +02:00
Michael Eischer
7d5ebdd0b3
version: convert to termstatus
2025-09-18 22:58:23 +02:00
Michael Eischer
d6c75ba2dc
prune: drop unused parameter
2025-09-17 21:18:15 +02:00
Michael Eischer
2a9105c050
forget/snapshots: properly change error returned by PrintSnapshots
2025-09-17 21:16:39 +02:00
Michael Eischer
364271c6c3
Consistently use withTermstatus in tests
2025-09-15 22:37:55 +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
5a16b29177
remove unused global output functions
2025-09-15 22:35:48 +02:00
Michael Eischer
320fb5fb98
convert repository open/create to use termstatus
2025-09-15 22:35:32 +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