mtkennerly / ludusavi

Backup tool for PC game saves
MIT License
2.68k stars 58 forks source link

Backup to cloud? #13

Closed keethesh closed 1 year ago

keethesh commented 4 years ago

First of all, that's a very good project! Thank you for sharing it! But I think it would be a great thing to be able to backup and restore to and from a cloud, Drive or Dropbox, for example.

If you want, I can write that "module" in Python, as it is possible to run Python code in Rust, using pyo3. Let me know what you think!

mtkennerly commented 4 years ago

This would be cool to have! I'd imagine most backups should be small enough to just put into the local sync folder, but it wouldn't hurt to have the option to go straight to the cloud if you're tight on space (or if that's just your preference).

I'd prefer to stick to pure Rust, though, since it offers a lot of safety checks at compile time. As much as I like Python, it's easy to make a typo and not find out right away. Here are some Rust crates for cloud support:

If you're interested in working on this, I think it breaks down into these main parts:

mtkennerly commented 4 years ago

By the way, one other consideration is that I'd really like to avoid having a dependency on OpenSSL, so I'd want to see if those cloud crates have an option to use rustls instead, If they don't already have that option, perhaps they'd be open to adding it as a crate feature.

keethesh commented 4 years ago

Hey there! I'm really sorry, I don't know Rust! But I'll try to learn the basics, and add that myself! Btw, I was more thinking of it as a "safety measure", just in case something goes wrong on the hard drive itself, or if someone needs to transfer his save files to another computer.

mtkennerly commented 4 years ago

No need to apologize \:) It's absolutely up to you if it's something you're interested in or comfortable with, so no worries either way.

Acting as a safety measure is definitely important, although it's actually possible to satisfy that use case today. For example, on my system, if I set C:/Users/mtken/Google Drive/ludusavi-backup as the backup folder, then the Google Drive service will automatically sync it. That works even without Ludusavi knowing anything about it.

But I can think of some use cases where someone wouldn't/couldn't do that:

sharkusmanch commented 4 years ago

Workaround for anyone looking to backup to the cloud with the current version of ludusavi:

mtkennerly commented 4 years ago

Looking at the sheer number of backends that rclone supports, I'm thinking it's probably better for Ludusavi to just integrate with rclone rather than trying to integrate with individual cloud services. That would be fantastic to have support for all those backends out of the box.

sharkusmanch commented 3 years ago

Created a playnite plugin that sources save files from ludusavi's --api and will backup/snapshot the files using restic. Rclone can also be the provider for the restic repository, so that opens up many different backends for game save storage in the cloud.

sluedecke commented 2 years ago

Though probably slightly off topic, syncthing might be an option. Written in go (thus off topic), it can keep folder structures in sync across devices without the need for a third party cloud.

My personal use case would be to sync saves across different machines I own. I bought many Linux games on GOG and GOG Galaxy does NOT run on Linux natively, so no cloud sync of save games there.

t3dium commented 2 years ago

for windows specifically, mountain duck might be worth considering. can mount cloud storage's as a network folder in windows, and you can then point ludusavi to that path

LeSnake04 commented 2 years ago

These might be usefull as well: https://docs.rs/dav-server/latest/dav_server/ https://lib.rs/crates/async_ftp

subworx commented 1 year ago

My personal use case would be to sync saves across different machines I own. I bought many Linux games on GOG and GOG Galaxy does NOT run on Linux natively, so no cloud sync of save games there.

It is possible to use the Galaxy features in Linux, see reddit

mtkennerly commented 1 year ago

This is finally complete :D If anyone would like to try it in advance and give feedback, here are some preview builds:

I haven't updated the documentation yet, but I'm happy to answer any questions. You can use the "other" screen to configure it.

You can also double check the other changes so far. You may want to make a copy of your Ludusavi config first in case you'll switch back and forth between the stable and preview versions.