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

support rclone's bisync feature #267

Open
nioncode opened this issue Aug 27, 2023 · 1 comment
Open

support rclone's bisync feature #267

nioncode opened this issue Aug 27, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@nioncode
Copy link

What's your idea?

Currently, ludusavi uses rclone sync to backup / restore savegames. This completely overwrites the state in the remote with the local changes.

It would be great if ludusavi would support rclone bisync instead, which would allows to change the savegame directory on multiple machines at the same time and then sync those changes on the next sync attempt without overwriting each other. This would prevent issues either:

  • if one does not manage to backup their latest local savegames (because of some error), but then tries to restore the latest savegames in the future (I think ludusavi will error out in this case though?)
  • if one plays on two devices at the same time (different games) and then sync both of them. I think this is not possible at the moment, because one of the backups will overwrite the other (or does ludusavi work around this?)

In any case, I think ludusavi works around some of the issues already, but maybe switching to bisync feature would simplify ludusavi's code, since it does not have to handle so many edge cases.

@nioncode nioncode added the enhancement New feature or request label Aug 27, 2023
@mtkennerly
Copy link
Owner

I think this would be a good option, but there are some complications. The backup structure would need to be tweaked first in order to make bisync work well:

  • Each game has a single mapping.yaml, which keeps track of the backup metadata. To make this safe for bisync, each backup would need a standalone metadata file. Otherwise, the bisync would produce mapping.yaml.path1 and mapping.yaml.path2 files as part of its non-destructive conflict handling.
  • Similarly, if your backup retention is set to 1 full and 0 differential, then each game's backup folder is reused. This could also lead to conflicts.

if one does not manage to backup their latest local savegames (because of some error), but then tries to restore the latest savegames in the future (I think ludusavi will error out in this case though?)

If you have the "synchronize automatically" option enabled, then Ludusavi will show a warning about being out of sync with the cloud, but it will still restore your local backup.

if one plays on two devices at the same time (different games) and then sync both of them. I think this is not possible at the moment, because one of the backups will overwrite the other (or does ludusavi work around this?)

It's possible, but not fully streamlined. If you enable the "synchronize automatically" option and make a backup of a single game, then Ludusavi will only check for cloud conflicts in that game's backup folder. However, if you back up all games at once, then it will check for any cloud conflicts in any backup folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants