2
2
mirror of https://github.com/octoleo/restic.git synced 2024-12-01 17:23:57 +00:00
restic/internal/repository
Ryan Hitchman 77bf148460 backup: add --dry-run/-n flag to show what would happen.
This can be used to check how large a backup is or validate exclusions.
It does not actually write any data to the underlying backend. This is
implemented as a simple overlay backend that accepts writes without
forwarding them, passes through reads, and generally does the minimal
necessary to pretend that progress is actually happening.

Fixes #1542

Example usage:

$ restic -vv --dry-run . | grep add
new       /changelog/unreleased/issue-1542, saved in 0.000s (350 B added)
modified  /cmd/restic/cmd_backup.go, saved in 0.000s (16.543 KiB added)
modified  /cmd/restic/global.go, saved in 0.000s (0 B added)
new       /internal/backend/dry/dry_backend_test.go, saved in 0.000s (3.866 KiB added)
new       /internal/backend/dry/dry_backend.go, saved in 0.000s (3.744 KiB added)
modified  /internal/backend/test/tests.go, saved in 0.000s (0 B added)
modified  /internal/repository/repository.go, saved in 0.000s (20.707 KiB added)
modified  /internal/ui/backup.go, saved in 0.000s (9.110 KiB added)
modified  /internal/ui/jsonstatus/status.go, saved in 0.001s (11.055 KiB added)
modified  /restic, saved in 0.131s (25.542 MiB added)
Would add to the repo: 25.892 MiB
2021-08-04 21:19:29 +02:00
..
testdata Moves files 2017-07-23 14:19:13 +02:00
doc.go Moves files 2017-07-23 14:19:13 +02:00
index_parallel_test.go repository: Add test for ForAllIndexes 2020-12-22 22:36:18 +01:00
index_parallel.go check: extract parallel index loading 2020-12-22 22:36:18 +01:00
index_test.go errcheck: Add error checks 2021-01-30 20:02:37 +01:00
index.go Use BlobHandle in index methods 2020-11-22 20:41:12 +01:00
indexmap_test.go Chaining hash table for repository.Index 2020-07-19 13:58:22 +02:00
indexmap.go Chaining hash table for repository.Index 2020-07-19 13:58:22 +02:00
key.go init: pass proper context to master key generation 2020-10-09 22:37:56 +02:00
master_index_test.go errcheck: Add error check for MergeFinalIndexes() 2021-01-30 20:02:37 +01:00
master_index.go errcheck: Add error check for MergeFinalIndexes() 2021-01-30 20:02:37 +01:00
packer_manager_test.go Use "pack file" instead of "data file" (#2885) 2020-08-16 11:16:38 +02:00
packer_manager.go Decrease allocation rate in internal/pack 2020-11-15 16:51:47 +01:00
repack_test.go errcheck: Add error checks 2021-01-30 20:02:37 +01:00
repack.go Return hdrSize in ListPack 2020-11-21 22:13:54 +01:00
repository_internal_test.go Use "pack file" instead of "data file" (#2885) 2020-08-16 11:16:38 +02:00
repository_test.go repository: move otherwise unused LoadIndex to tests 2020-12-22 22:36:18 +01:00
repository.go backup: add --dry-run/-n flag to show what would happen. 2021-08-04 21:19:29 +02:00
testing.go Merge pull request #2505 from aawsome/fix-repo-configfile 2020-12-07 07:52:37 +01:00
worker_group.go defer close(ch) outside repository.RunWorkers 2020-10-14 15:50:16 +02:00