-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Feature request: "Restore newer/missing datasets" / "synchronize" #200
Description
It would be useful to have a feature that allows restoring files/datasets that are not currently in a "checked out" state locally while avoiding doing "double work" by downloading data that already resides in the local target directory.
This feature would enable asynchronous synchronization of files between multiple machines (not necessarily online at the same time), enabling users to have a full, shared, encrypted backup on an untrusted (always online) machine that the individual machines can sync from/to when they are online.
I envision an implementation that resembles the restore command that:
- Takes a designated (local) target directory
- loops over all snapshots - pseudo-code:
for snapshot in `./restic list snapshots|egrep -o '[a-f0-9]{64}'`
do ./restic ls $snapshot
done- Checks if any of the files in the snapshots are newer than what currently resides in the target directory, or if there are files present in the snapshot that do not exist in the local checkout.
- Selectively does a
restic restore $snapshotto extract the files
NOTE: One issue that could arise from the implementation of this feature is that it becomes impossible to delete a file as long as the snapshots still exists on the remote end.
A mechanism to "ignore" specific files/trees that you do not want restored / have been deleted would probably be desirable. This is already on the drawing board: #86
Thoughts? :-)