mathisdt / trackworktime

Android app to track your work time via WiFi or location and categorize each recorded intervall by a predefined client/task and a free text.

Home Page:https://zephyrsoft.org/trackworktime

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

create a backup of the app's current data previously to a restore operation

mathisdt opened this issue · comments

To make it unlikely that a user restores from an old backup (and potentially overwrites the newer data the app contains), the restore mechanism should display the first and last event's date. Only if the user confirms this time range, the restore should continue.

It would also be possible to create a backup of the app's current data (previously to restoring) using the backup mechanism but storing it apart from the normal backup (maybe with a timestamp suffix). This way, a restore from an incomplete backup would always be reversible.

The implemented solution went with the second comment: only a backup to special files suffixed with the current timestamp in done before starting a restore.

If the backup prior to the restore operation fails, the error is logged but ignored - it's only a safety measure and should not keep the restore from working.