LuteOrg / lute-v3

LUTE = Learning Using Texts: learn languages through reading. Python/Flask.
MIT License
423 stars 46 forks source link

Add ability to restore a backup file. #188

Open M-Biggles opened 8 months ago

M-Biggles commented 8 months ago

As the title says simply, add the ability to restore backups at any time. This would wipe the current data and replace it. Make sure user gets warned sufficiently.

Mentioned here:

(Originally posted by @M-Biggles in https://github.com/jzohrab/lute-v3/issues/173#issuecomment-1925761475).

jzohrab commented 8 months ago

Technically this isn't that tough to do, but I wonder what the utility is. Users might end up losing data (e.g. user has db backup X but is currently using Y, user adds many terms to Y, user restores backup X -- all the new terms would still exist in Y (assuming we backup Y), but they'd be gone from X).

M-Biggles commented 8 months ago

Even if it's just handy for testing. I'd say it would get some use though Sometimes we corrupt files. I'd like to be able to back up my Lute file and restore after reinstalling my OS every year or two.

The process for Restoring data and deleting data should be a two step process.

jamesdeluk commented 8 months ago

Another use case: (one-way) syncing between devices. I have a second installation on my phone where I simply read/review without updating the terms.