Michael Eischer
e775192fe7
don't sort snapshots, drop duplicate code and cleanup copyTreeBatched function signature
2025-11-23 16:20:40 +01:00
Michael Eischer
4395a77154
copy: remove bugous seenBlobs set
2025-11-23 16:06:45 +01:00
Michael Eischer
81d8bc4ade
repository: replace CopyBlobs with Repack implementation
2025-11-23 16:06:29 +01:00
Winfried Plappert
b87f7586e4
restic copy --batch: a fresh start from commit 382616747
...
Instead of rebasing my code, I decided to start fresh, since WithBlobUploader()
has been introduced.
changelog/unreleased/issue-5453:
doc/045_working_with_repos.rst:
the usual
cmd/restic/cmd_copy.go:
gather all snaps to be collected - collectAllSnapshots()
run overall copy step - func copyTreeBatched()
helper copySaveSnapshot() to save the corresponding snapshot
internal/repository/repack.go:
introduce wrapper CopyBlobs(), which passes parameter `uploader restic.BlobSaver` from
WithBlobUploader() via copyTreeBatched() to repack().
internal/backend/local/local_windows.go:
I did not touch it, but gofmt did: whitespace
2025-11-19 07:09:24 +00:00
Michael Eischer
3b854d9c04
Merge pull request #5449 from provokateurin/restore-ownership-by-name
...
Create and publish a Docker image / build-and-push-image (push) Waiting to run
Create and publish a Docker image / provenance (push) Blocked by required conditions
test / Linux Go 1.23.x (push) Waiting to run
test / Linux Go 1.24.x (push) Waiting to run
test / Linux (race) Go 1.25.x (push) Waiting to run
test / Windows Go 1.25.x (push) Waiting to run
test / macOS Go 1.25.x (push) Waiting to run
test / Linux Go 1.25.x (push) Waiting to run
test / Cross Compile for subset 0/3 (push) Waiting to run
test / Cross Compile for subset 1/3 (push) Waiting to run
test / Cross Compile for subset 2/3 (push) Waiting to run
test / lint (push) Waiting to run
test / Analyze results (push) Blocked by required conditions
test / docker (push) Waiting to run
feat(internal/fs/node): Restore ownership by name
2025-11-16 16:50:36 +01:00
provokateurin
8fae46011a
feat(internal/fs/node): Restore ownership by name
2025-11-16 16:40:58 +01:00
Winfried Plappert
25611f4628
restic copy - add statistics counters
...
cmd/restic/cmd_copy.go:
add function copyStats() and call it before the actual copying starts.
changelog/unreleased/pull-5319:
rephrased wording of the statistics counters.
2025-11-16 13:47:10 +01:00
Winfried Plappert
90ac3efa88
restic copy - add additional status counters
...
'copyTree()' now counts and sizes the blobs in 'copyBlobs' and prints them out
via 'Verbosef()'.
2025-11-16 13:46:27 +01:00
Michael Eischer
14f3bc8232
Merge pull request #5560 from MichaelEischer/index-iterators
...
index: port to modern Go iterators
2025-11-16 13:24:48 +01:00
Michael Eischer
38c543457e
index: convert to implement modern go iterators
2025-11-16 12:56:37 +01:00
Michael Eischer
a0925fa922
repository: set progress bar maximum in Repack
2025-11-16 12:51:46 +01:00
Michael Eischer
b2afccbd96
repository: remove unused obsoletePacks return values from Repack
2025-11-16 12:51:46 +01:00
Michael Eischer
0624b656b8
Merge pull request #5558 from MichaelEischer/simplify-blob-upload
...
repository: enforce correct usage of SaveBlob
2025-11-16 12:51:01 +01:00
Michael Eischer
157f174dd9
Merge pull request #5370 from hashier/feat/exclude-macOS-cloud-files
...
feat(backup): add possibility to exclude macOS cloud-only files
2025-11-16 11:57:37 +01:00
Michael Eischer
c6e33c3954
repository: enforce that SaveBlob is called within WithBlobUploader
...
This is achieved by removing SaveBlob from the public API and only
returning it via a uploader object that is passed in by
WithBlobUploader.
2025-10-12 18:26:26 +02:00
Michael Eischer
aa7bd241d9
init: move more logic into global package
2025-10-12 18:08:26 +02: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
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
Michael Eischer
ac4642b479
repository: replace StartPackUploader+Flush with WithBlobUploader
...
The new method combines both step into a single wrapper function. Thus
it ensures that both are always called in pairs. As an additional
benefit this slightly reduces the boilerplate to upload blobs.
2025-10-08 22:49:45 +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
Christopher Loessl
f3d95893b2
feat(backup): add possibility to exclude macOS cloud-only files
2025-10-04 19:22:51 +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