Skip to content

Feature request: "Restore newer/missing datasets" / "synchronize" #200

@cfcs

Description

@cfcs

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:

  1. Takes a designated (local) target directory
  2. loops over all snapshots - pseudo-code:
for snapshot in `./restic list snapshots|egrep -o '[a-f0-9]{64}'`
  do ./restic ls $snapshot
done
  1. 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.
  2. Selectively does a restic restore $snapshot to 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? :-)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions