Kunzisoft / KeePassDX

Lightweight vault and password manager for Android, KeePassDX allows editing encrypted data in a single file in KeePass format and fill in the forms in a secure way.
https://www.keepassdx.com/
GNU General Public License v3.0
4.32k stars 261 forks source link

Add automatic backup #925

Closed Vstory closed 3 years ago

Vstory commented 3 years ago

Is your feature request related to a problem? Please describe. When the database changes, the backup is automatically triggered.When writing a new entry to the database, the database before writing is backed up.

Describe the solution you'd like

  1. Increase regular automatic backup database;
  2. When the database changes, back up the database.

Additional context KeePassDX Pro 2.9.14, always in the state of writing entries when writing entries.I ended the application process directly, and then read the database, the database was damaged. If there is an automatic backup function, you can directly use the backup to restore database problems. Now I can only use the computer's older database. . Why forcibly terminate the application? Because it took more than the usual normal time to write to the database.App is not responding.

Screenshot_2021-03-14-00-45-42-650_com kunzisoft keepass pro

Screenshot_2021-03-14-00-46-57-311_com kunzisoft keepass pro

J-Jamet commented 3 years ago

KeePassDX Pro 2.9.14, always in the state of writing entries when writing entries.I ended the application process directly, and then read the database, the database was damaged.

Here it's clearly a bug, we have to find out why there is this problem and solve it, but as you pointed it, an issue is already opened for that.

The subject of backup has been treated in other threads, it will not be done directly in KeePassDX because it is not its scope. But another application may be able to automate it, launching a backup in the URI stream by KeePassDX can be seen by the other file manager app as a trigger to create a backup and a file copy. https://github.com/Kunzisoft/KeePassDX/issues/897

J-Jamet commented 3 years ago

I close this issue because the topics are covered in other threads.

Vstory commented 3 years ago

The subject of backup has been treated in other threads, it will not be done directly in KeePassDX because it is not its scope. But another application may be able to automate it, launching a backup in the URI stream by KeePassDX can be seen by the other file manager app as a trigger to create a backup and a file copy. #897

I didn't use another file manager, I selected the database using the Android document application. There is no other application to modify the database, only KeePassDX reads and writes the database.

What I mean is that when entries are created or modified in KeePassDx, the database at this time should be backed up in advance. Avoid similar situations that lead to database damage.

Just like the KPSimpleBackup.plgx plugin does.

Snipaste_2021-03-15_22-45-21

This can effectively avoid database problems caused by program errors.

J-Jamet commented 3 years ago

I understood what you meant by doing backups but you didn't read the thread I mentioned. #897 Create a backup system is the same as a permanent cache in the app, which I do not want because KeePassDX is only a file editor and does not do any operation related to the file itself (only to file data, no file copy). It is up to the manager to make this backup. The solution is to create a new file manager application that makes a backup when the file is saved, if you use the default manager you will just have to install the new manager but I haven't created it yet. You have to be aware that applications designed for PC are not designed in the same way for Android. There is no plugin system in KeePassDX yet. But there will be in the separate manager app, to install additional features you want (but the app still needs to be designed).

This can effectively avoid database problems caused by program errors.

The solution for this is to fix the problem that prevents saving. If it's an uncaught exception, I need to know which one in order to fix the problem, but I haven't found it yet because I haven't been able to reproduce this behavior. That's why version 2.9.14 is still in beta.