2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-22 21:05:10 +00:00
restic/internal/backend
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
..
azure azure/gs: Fix default value in connections help text 2021-05-17 20:56:51 +02:00
b2 backends: add sanity check for the uploaded file size 2021-01-29 13:51:51 +01:00
dryrun backup: add --dry-run/-n flag to show what would happen. 2021-08-04 21:19:29 +02:00
gs azure/gs: Fix default value in connections help text 2021-05-17 20:56:51 +02:00
local Modernize error handling in local backend 2021-06-18 11:13:27 +02:00
location Hide password from repository URLs 2020-09-22 22:00:51 +02:00
mem mem: check upload length before storing upload 2021-01-30 21:23:20 +01:00
rclone Use rclone.wrappedConn by pointer 2021-08-01 09:11:50 +02:00
rest rest: Rework handling HTTP2 zero-length replies bug 2021-07-31 17:12:24 +02:00
s3 Return s3.fileInfos by pointer 2021-06-07 19:48:43 +02:00
sftp Handle lack of space and remove broken files in SFTP backend 2021-03-27 15:02:14 +01:00
swift swift: explicitly pass upload size to library 2021-01-29 13:50:46 +01:00
test backend: try to cleanup test leftovers 2021-01-30 21:23:20 +01:00
testdata Moves files 2017-07-23 14:19:13 +02:00
backend_error.go backend: Improve Save() 2018-03-03 15:49:44 +01:00
backend_retry_test.go Add more error handling 2021-01-30 20:19:47 +01:00
backend_retry.go retrybackend: Fail operations when context is already canceled 2020-12-28 21:06:47 +01:00
doc.go Moves files 2017-07-23 14:19:13 +02:00
foreground_sysv.go AIX port 2020-12-29 01:35:01 +01:00
foreground_test.go errcheck: Add error checks 2021-01-30 20:02:37 +01:00
foreground_unix.go AIX port 2020-12-29 01:35:01 +01:00
foreground_windows.go Sanitize environment before starting backend processes (rclone, ssh) 2020-11-02 16:41:23 +01:00
foreground.go Sanitize environment before starting backend processes (rclone, ssh) 2020-11-02 16:41:23 +01:00
http_transport.go Allow HTTP/2 2021-01-31 02:44:30 +01:00
layout_default.go Use "pack file" instead of "data file" (#2885) 2020-08-16 11:16:38 +02:00
layout_rest.go backend: Only return top-level files for most dirs 2017-12-14 19:14:16 +01:00
layout_s3legacy.go Use "pack file" instead of "data file" (#2885) 2020-08-16 11:16:38 +02:00
layout_test.go Wire context into backend layout detection 2020-10-09 22:37:24 +02:00
layout.go Wire context into backend layout detection 2020-10-09 22:37:24 +02:00
paths.go Moves files 2017-07-23 14:19:13 +02:00
semaphore.go uint cannot be less than zero 2020-09-05 10:07:16 +02:00
shell_split_test.go Refactor SplitShellStrings 2018-04-01 10:16:31 +02:00
shell_split.go Refactor SplitShellStrings 2018-04-01 10:16:31 +02:00
utils_test.go Use "pack file" instead of "data file" (#2885) 2020-08-16 11:16:38 +02:00
utils.go Add more error handling 2021-01-30 20:19:47 +01:00