Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bidirectional sync ? #943

Open
alkeryn opened this issue Nov 15, 2023 · 3 comments
Open

bidirectional sync ? #943

alkeryn opened this issue Nov 15, 2023 · 3 comments
Labels
C-wontfix Category: This will not be worked on

Comments

@alkeryn
Copy link

alkeryn commented Nov 15, 2023

hey do you think it would be possible to add bidirectional synchronization ?
rclone can do it but it would be neat to have all the advantages of restic at the same time.

@github-actions github-actions bot added the S-triage Status: Waiting for a maintainer to triage this issue/PR label Nov 15, 2023
@simonsan simonsan added C-question Category: Further information is requested C-enhancement Category: New feature or request and removed S-triage Status: Waiting for a maintainer to triage this issue/PR labels Nov 15, 2023
@simonsan
Copy link
Contributor

Can you shortly describe what you expect of this possible feature? How do you as a user imagine it to work? What are you going to achieve with it?

@alkeryn
Copy link
Author

alkeryn commented Nov 16, 2023

Hey simonsan, thanks for the prompt reply !
so the idea would be a feature similar to rclone's bisync, the idea is that if you have local and remote, you push all files that are in local but not in remote to remote, but at the same time you pull all files that are in remote but not in local.
if on top you can keep track of deletions events that would be neat, meaning if a file got deleted in remote, it'll also delete it from local.

that's generally how most cloud services like google drive or mega work, except for the fact that you would have all of rustic's advantages like using s3.
and at the difference that it isn't syncing constantly and in realtime but only when the command is run.

realtime syncing would be amazing and i wish i had something like rustic that'd do realtime syncing but that now seems really out of scope.

have a good day !

@aawsome
Copy link
Member

aawsome commented Nov 20, 2023

Actually syncing is not the main objective for rustic - there are tools like syncthing out there which may suit to your needs much better!

If you want something like syncing without deletion, you can do the following:

  • run backup on computer A -> gives snapshot a0
  • run backup on computer B -> gives snapshot b0
  • obtain a merged snapshot using rustic merge a0 b0 -> gives snapshot m0

Then, to actually do the syncing, run:

  • backup on computer A -> gives snapshot a1
  • merge the backup into the merged snapshot: rustic merge m0 a1 -> gives snapshot m1
  • directly restore snapshot m1 on computer A (this in fact just restores the additional files on m1)

And the same on the other computer:

  • backup on computer B -> gives snapshot b1
  • merge the backup into the merged snapshot: rustic merge m1 b1 -> gives snapshot m2
  • directly restore snapshot m2 on computer B (this in fact just restores the additional files on m2)

.. and so on...

The snapshots a0, a1, b0, b1, m0, m1,m2 need to be replaced with the actual snapshot IDs, of course, so this may need a bit of scripting.

@simonsan simonsan added C-wontfix Category: This will not be worked on and removed C-enhancement Category: New feature or request C-question Category: Further information is requested labels Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-wontfix Category: This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants