1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2025-03-23 00:00:04 +01:00
restic/internal
Sebastian Hasler fcb451cd1f backup: support reading changed files/dirs from a file
For `restic backup`, support new flags
`--changed-files-from-verbatim` and `--changed-files-from-raw` to
read the files/dirs that actually have changed from a file (or
multiple files). Directories that don't (directly or indirectly)
contain any changed files/dirs will reuse the corresponding subtree
of the parent snapshot.

This option is useful for higher-level backup tools which use
restic as a backend but have their own mechanism of figuring out
which files have changed (e.g., using zfs or btrfs diff tools).
We require to explicitly pass `--parent` as a protection mechanism
in order to make sure the higher-level backup tool and restic agree
on the parent snapshot. Though the caller can circumvent this
protection mechanism by passing `--parent latest`.

Caveat: since device IDs are unstable (across reboots or across
different zfs/btrfs snapshots of the same subvolume), the parent
snapshot and current snapshot might have mismatching device IDs.
In this case, the feature will still reuse subtrees of the parent
snapshot (under the conditions mentioned above), so we end up with
a snapshot that contains subtrees with different `device_id`
values, even if there was only a single mountpoint in play.

For now, we could simply document this caveat and discourage users
who rely on correct restoration of hardlinks from using this
feature. When https://github.com/restic/restic/issues/3041 is
properly fixed in the future, then this caveat probably goes away,
too.

The idea for this feature emerged here:
https://github.com/restic/restic/issues/1502#issuecomment-1721956623
2023-09-16 11:09:06 +02:00
..
archiver backup: support reading changed files/dirs from a file 2023-09-16 11:09:06 +02:00
backend backend: Fix unreliable TestListCancel/Timeout test 2023-07-23 11:47:56 +02:00
bloblru bloblru: Upgrade to hashicorp/golang-lru/v2 2022-11-27 17:18:13 +01:00
cache Merge pull request #4343 from greatroar/cache 2023-06-02 22:41:17 +02:00
checker check: Fix flaky TestCheckerModifiedData 2023-05-01 17:18:19 +02:00
crypto Replace lots of unused parameters with _ 2023-05-18 21:17:53 +02:00
debug Rename unused testing parameter to _ 2023-05-18 21:17:53 +02:00
dump dump: Rewrite Linux ACL handling 2023-08-13 13:37:11 +02:00
errors errors: Drop WithMessage 2022-10-14 14:06:47 +02:00
filter remove no longer necessary conditional compiles 2022-11-27 13:18:44 +01:00
fs Move PreallocateFile to fs package 2023-06-09 11:49:06 +03:00
fuse restic: Cleanup and simplify TestCreateSnapshot 2023-07-22 19:55:57 +02:00
hashing Replace most usages of ioutil with the underlying function 2022-12-02 19:36:43 +01:00
index master_index: fix inconsistent length blob length in test 2023-08-19 20:04:25 +02:00
migrations restic: generic implemention of AsBackend 2023-07-22 19:55:44 +02:00
options backend, options: Prefer strings.Cut to SplitN 2022-12-02 19:19:14 +01:00
pack repository: optimize MasterIndex.Each 2022-09-24 12:21:59 +02:00
repository Merge pull request #4353 from MichaelEischer/tune-gc 2023-06-16 23:24:39 +02:00
restic internal/restic: Return summary from BlobSet.String 2023-08-25 21:41:30 +02:00
restorer Move PreallocateFile to fs package 2023-06-09 11:49:06 +03:00
selfupdate Replace lots of unused parameters with _ 2023-05-18 21:17:53 +02:00
test test: use standard logging methods from testing for the test helpers 2023-05-26 19:34:57 +02:00
textfile Replace most usages of ioutil with the underlying function 2022-12-02 19:36:43 +01:00
ui cmd, ui: Move size parsing code and make it more robust 2023-07-02 21:44:50 +02:00
walker Use _ as parameter name for unused Context 2023-05-18 21:15:45 +02:00