KeePassDX icon indicating copy to clipboard operation
KeePassDX copied to clipboard

Binding one or more one-way write URIs for a database and auto overwrite those URIs

Open HaujetZhao opened this issue 5 years ago • 6 comments

Is your feature request related to a problem? Please describe.

When device is lost or damaged, the Keepass database may get lost forever. Setting up a backup task can mend this, but it requires another app to be opened, which is trifle and not as convinient as auto backup when saving in KeepassDX.

Describe the solution you'd like

Bind one or more backup URIs to a database in KeepassDX. Those URIs are provided by content provider such as OneDrive App or other File Manager.

After saving database, KeepassDX over write the database to the URIs bund before.

So KeepassDX don't need to introduce built-in file manager or remote utility or internet permission, while users can easily auto upload the newest database to remote storage.

Describe alternatives you've considered

I use Mixplorer to do the backup things for now, but Mixplorer is alway not in the background, so the timer task ususlly don't work, turned out I still have to manually backup the database to my cloud disk.

HaujetZhao avatar Nov 28 '20 06:11 HaujetZhao

Linked to #342

For me, the file copy part should not be done on the editor side (KeePassDX). To resume the comparison with LibreOffice on PC, how do you make a backup of an important file that you have just modified? Simply by copying the file to another location. There may be routines that automate these tasks, but these are external tools.

The goal of an editor is to modify the content of a file according to user needs, not to recover several streams of content to duplicate them. In addition to being rather complicated to set up, it could cause problems depending on the origin of the flows.

I understand that you are looking for an easy to use tool. In this case, you would need a file manager (the second app https://github.com/Kunzisoft/KeePassDX/issues/342#issuecomment-733681343) with a file copy routine that would react to a backup event. If the backup of the file modified by the editor is finished, perform an X action (here make a backup). It would be much more flexible.

If you want all-in-one tools, there are plenty more on the store. The goal is not to completely copy existing applications. I want KeePassDX to keep it simple and do exactly what it was designed to do. We can also create a universal file backup tool in a new app. That would be cool.

J-Jamet avatar Nov 28 '20 08:11 J-Jamet

Also, the backup in this case is an external notion already implemented in various Cloud applications (https://support.google.com/drive/answer/2409045) where you have a history of modified files. The history of the content of the file is already implemented in KeePassDX, it corresponds to the history of each entry which is configurable.

J-Jamet avatar Nov 28 '20 08:11 J-Jamet

The thing bothers me is that, if I need to perform a auto copy backup, it will require this backup app running. But all the file manager apps (all the non system apps) are easy to get killed in the background on Android. Even if I use some chore work to make it run 24h at the background on my phone, it could bring downside to the phone speed and battery performance. So setting up a long run background automator is possible, but not easy, and comes at much cost.

That's the reason I brought this up, I wish the time that need a backup, is also the time that the app is running. The KeepassDX app just have the right chance and only the backup process on KeepassDX can minimum the cost on a phone.

KeepassDX is indeed a editor, but the content it edits is way more important than normal files. Comparing keepass database to normal documents, just like comparing a nuke bomb missile to a rifle. Every nuke missile silo has way more insurance measures than a rifle.

That's my personal view, if you decline, it's also understandable.

HaujetZhao avatar Nov 28 '20 09:11 HaujetZhao

The thing bothers me is that, if I need to perform a auto copy backup, it will require this backup app running. But all the file manager apps (all the non system apps) are easy to get killed in the background on Android. Even if I use some chore work to make it run 24h at the background on my phone, it could bring downside to the phone speed and battery performance. So setting up a long run background automator is possible, but not easy, and comes at much cost.

In this case, the solution is to implement a service that launches when needed in the backup app. JobScheduler is perfect for this.

That's the reason I brought this up, I wish the time that need a backup, is also the time that the app is running

If the URI is retrieved from another app, the content-provider of the other app is running so the application is running.

KeepassDX is indeed a editor, but the content it edits is way more important than normal files. Comparing keepass database to normal documents, just like comparing a nuke bomb missile to a rifle. Every nuke missile silo has way more insurance measures than a rifle.

I agree, that's why I also recommend making backups. https://github.com/Kunzisoft/KeePassDX/wiki/Backup

An automatic backup system with is quite feasible, just have to create the right app. It just doesn't exist yet, that's what's bothering you.

J-Jamet avatar Nov 28 '20 10:11 J-Jamet

Personally, I see KeepassDX as a password manager, the keepass database editing ability is just it's way to manage password. From that perspective, auto backup does not go beyond it's obligation concerns managing.

Treating KeepassDX as an kdbx editor is seeing using KeepassDX as a static, unlinked, isolated process, while managing password is a dynamic, linked, associative job.

Unfortunately, Google Service is not available in China. So, I can not reach the JobScheduler.

Since then, I just continue to use Tasker and Mixplorer this geek way to do my backup. I just wish some future improvement could make it easier recommanding KeepassDX to non-IT folks.

HaujetZhao avatar Nov 28 '20 10:11 HaujetZhao

Treating KeepassDX as an kdbx editor is seeing using KeepassDX as a static, unlinked, isolated process,

If you want to see it this way it's fine. From my point of view, it allows you to encapsulate several static blocks (and KeePassDX is one of those blocks) to create a global dynamic system if associated with other blocks, which makes it very scalable and secure. We just have to change a block if it doesn't match our expectations anymore.

Unfortunately, Google Service is not available in China. So, I can not reach the JobScheduler.

JobScheduler is not part of google services but of standard APIs, so apps that use these classes work fine on all Android devices.

Since then, I just continue to use Tasker and Mixplorer this geek way to do my backup. I just wish some future improvement could make it easier recommanding KeepassDX to non-IT folks.

Yes, of course, when I have the time I will make a file manager backup manager and I will do a better explanatory communication. (But it's an unfunded project so I have to find the motivation and the time)

J-Jamet avatar Nov 28 '20 10:11 J-Jamet