restic/internal
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
..
archiver Merge pull request #3243 from restic/fix-scanner-overlap 2021-01-30 21:17:21 +01:00
backend backup: add --dry-run/-n flag to show what would happen. 2021-08-04 21:19:29 +02:00
cache Add more error handling 2021-01-30 20:19:47 +01:00
checker Address issues reported by golint 2021-01-30 20:45:57 +01:00
crypto crypto: Remove unused error 2020-09-05 10:07:16 +02:00
debug Allow debug logging to pipes and terminals 2020-10-19 22:30:30 +02:00
dump Add more error handling 2021-01-30 20:19:47 +01:00
errors Modernize error handling in local backend 2021-06-18 11:13:27 +02:00
filter filter: Fix crash for '**' pattern 2021-05-14 23:50:31 +02:00
fs Add more error handling 2021-01-30 20:19:47 +01:00
fuse Address issues reported by golint 2021-01-30 20:45:57 +01:00
hashing errcheck: Add error checks 2021-01-30 20:02:37 +01:00
limiter Simplify internal/limiter 2021-04-24 11:54:43 +02:00
migrations Fix issues reported by semgrep 2020-12-11 09:41:59 +01:00
mock Add more error handling 2021-01-30 20:19:47 +01:00
options Some options fixes 2020-12-23 23:26:04 +03:00
pack Address issues reported by golint 2021-01-30 20:45:57 +01:00
repository backup: add --dry-run/-n flag to show what would happen. 2021-08-04 21:19:29 +02:00
restic Allow --tag and --keep-tag to match untagged snapshots 2021-08-02 23:06:20 +02:00
restorer restore: Test partial pack downloads in filerestorer 2021-06-29 21:11:30 +02:00
selfupdate self-update: Don't cancel download after 30 seconds 2019-02-23 11:15:18 +01:00
test Add more error handling 2021-01-30 20:19:47 +01:00
textfile Add more error handling 2021-01-30 20:19:47 +01:00
ui backup: add --dry-run/-n flag to show what would happen. 2021-08-04 21:19:29 +02:00
walker errcheck: More error handling 2021-01-30 20:02:37 +01:00