This PR is adds the backend functionality for a simple backup and restore mechanism:
It adds a function that allows to backup all launcher data to a specified folder
It adds a function to restore data from a folder of backup data
The idea is that the backup function may for example be called when the launcher is being quit and restoration from a backup could happen as part of the setup flow when starting with a new launcher from scratch.
This approach has amongst others the following limitations/drawbacks:
It is heavy in data storage as it backs up almost all data
The backed up data is not compressed into a single file as compression of this amount of data takes a long time and compression did not even seem to make the end-result considerably smaller
The problem of the case where a device breaks while the launcher is running and the backup then only contains partial source chain data which could then lead to source chain forks when restoring from that backup is not solved
Backing up to, from and across different OS has been tested (Windows 10, macOS Catalina, Ubuntu 22.04) and seems to work fine.
There is no associated UI yet to actually use it. For testing I used a very rudimentary approach of manually writing to a variable on the window object which you can see in this commit where I removed the code I've been using to test it.
Side note - I think the practice that you started on scaffolding to get PR reviews from a broader circle of people is a good idea so I will experiment with adopting it here as well @c12i .
This PR is adds the backend functionality for a simple backup and restore mechanism:
The idea is that the backup function may for example be called when the launcher is being quit and restoration from a backup could happen as part of the setup flow when starting with a new launcher from scratch.
This approach has amongst others the following limitations/drawbacks:
Backing up to, from and across different OS has been tested (Windows 10, macOS Catalina, Ubuntu 22.04) and seems to work fine.
There is no associated UI yet to actually use it. For testing I used a very rudimentary approach of manually writing to a variable on the window object which you can see in this commit where I removed the code I've been using to test it.