2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-23 05:12:10 +00:00
restic/internal/ui
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
..
json backup: add --dry-run/-n flag to show what would happen. 2021-08-04 21:19:29 +02:00
progress restic: Test progress reporting of StreamTrees 2021-01-28 11:10:50 +01:00
signals ui/progress: extract signal handling into own package 2020-12-29 16:32:18 +01:00
table avoiding unnecessary type conversions 2019-06-30 23:58:00 +03:00
termstatus Add test to mintty pipe detection 2021-04-11 20:02:09 +02:00
backup.go backup: add --dry-run/-n flag to show what would happen. 2021-08-04 21:19:29 +02:00
message.go Use new archiver code for backup 2018-04-28 22:08:11 +02:00
stdio_wrapper_test.go Simplify ui.StdioWrapper.Write 2020-10-17 20:30:46 +02:00
stdio_wrapper.go Simplify ui.StdioWrapper.Write 2020-10-17 20:30:46 +02:00