Keepassxc: Choose Backup Location

Created on 17 Jun 2019  路  20Comments  路  Source: keepassxreboot/keepassxc

Summary

Currently the backup is saved on the same folder, which defeats the purpose if my laptop catches on fire.

Ability to choose a different backup location (e.g. a different folder like Dropbox folder)

Desired Behavior

image

Possible Solution

An option to select the same folder or a new folder (even better if allows multiple locations to backup to)

Context

I like to backup to my Nextcloud, OneDrive, and Dropbox, each cloud has one copy of latest backup everytime I press save.

new feature

Most helpful comment

Please make it so users can choose a custom backup database filename as well

All 20 comments

This is a good idea!

Please make it so users can choose a custom backup database filename as well

And please include the ability to keep multiple backups (up to a thousand previous versions) with date/time as a filename suffix.

We aren't implementing a version control system here.

It would be useful to save some historical copies in the backup folder rather than repeatedly overwriting the single .old.kdbx file as is now the case.

Two reasons why that is unnecessary:

  1. Every entry has a history, you control how many history items are stored in the database settings
  2. Multiple backups creates a host of complications and ultimately ends up polluting the disk. Use a proper backup service if you are very concerned.

The backup file is really meant for corruption recovery on save and if you fudge a master password change.

@mustelid Yea, it's one reason why I can't full abandon KeePass original, because of nifty plugin called 'DatabaseBackup' that can backup to multiple locations (Dropbox, OneDrive, Other location) upon save. So the backup resides on different location, incase my HDD fails.

I like KeePassXC because it has very nice features like favicon downloads built-in and VERY good QR code scanning for TOTP. World beater, definitely a great software.

I would also like the possibility to make multiple automatic backups of the db on save.

The backup file is really meant for corruption recovery on save and if you fudge a master password change.

Give the default setting is autosave after every change, that means that if I change two entries in one session, the good copy is also overwritten, though.

This is true, but lets say you allow for 5 backup files... then 6 changes and you are now dead in the water. There is no good answer to this problem, EXCEPT, use a proper backup service and/or version control system outside of KeePassXC. You never want the same program doing the actions also doing your backups. Generally speaking a fault in the program that corrupts your save file will most likely corrupt your backup as well. You want to have a dead simple, program agnostic backup solution.

Examples:

  1. All major cloud storage providers do version control of files.
  2. You can do daily backups of your databases using built-in OS tools in Windows, Linux, or macOS
  3. Use Git to version control your database, run a periodic script that calls git commit -a -m "Database Backup". Use something like Guardian to run the task when the database changes.

As you can see, there is no reason for us to waste cycles implementing this in KeePassXC.

I agree that there's no perfect solution, I just want a good-enough one :-p

  • cloud locations aren't supported, I think; so that requires a manual action after every change.
  • most backup tools are, as you say, daily. I opened my other rfi exactly to mitigate that :-)
  • git, again, requires manual action after every change.

I'm not saying this is a high-urgency feature, far from it; but it would be a damn nice one to have.

In the other rfi, I suggested a (configurable?) time before overwriting the backup copy again; while there would obviously still be potential for data loss, I think that is a fairly simple thing to implement, that would mitigate (my) major concerns.

Then again, I appreciate you are doing this in your own time, so I'm certainly not about to tell you what you should and shouldn't do; I'm merely arguing my case :-D Thank you for doing this at all!

Yeah, something like that would be great. For me, it's just to have another copy somewhere, regularly updated, that is on a different device. #4302 might be related.
Would you accept a patch, that just adds the option to choose a different path for the backup file?

If you have C++ and Qt experience I would love a patch for this.

I don't but I started anyway. I think it's at least half done and I can upload the patch somewhere, if someone else also wants to take a look / continue. Right now I'm busy with real life stuff and I don't know when I am able to finish the work.

I'm still using the original KeePass for it's back-up plugin.

I'm still using the original KeePass for it's back-up plugin.

Which one in particular? Do you have a link? Does it work in keepassxc?

I'm still using the original KeePass for it's back-up plugin.

Which one in particular? Do you have a link? Does it work in keepassxc?

I personally use this one https://keepass.info/plugins.html#databasebackup (name: DatabaseBackup plugin)

It's great, you can select multiple locations (I selected my NextCloud, OneDrive, and Dropbox folders) and you can set an auto self-delete threshold (like delete after 20 copies). It auto backup with every save. I don't think it works with keepass though :(

It would be really nice to have to be able to have it sign the backups with a keyfile, this would make backing up and syncing soo much easier and would negate the need to deal with manually merging, or anything.
So I can have a database on my local machines that do not require the keyfile, but all the backups to my remote devices do require the keyfile to be present to unlock.
This alongside being able to set the custom backup location.

I'm still interested in the original feature request of being able to change the backup location, of which I think this issue somewhat drifted away from.
I'm currently mounting a WebDAV folder from my NAS (where it's backed up daily) and open the database from there. I'd like to have a local copy of the database in case my connection to or the NAS itself fails. By changing the backup location I could have this setup pretty easily without any third party help.

Saving backup to different location saved my butt. I was working off an obsolete folder that I accidentally deleted. :-) Thank goodness I saved to Dropbox or all my porn passwords will be erased.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

haroldm picture haroldm  路  3Comments

Throne3d picture Throne3d  路  3Comments

JosephHatfield picture JosephHatfield  路  3Comments

n1trux picture n1trux  路  3Comments

clementlesne picture clementlesne  路  3Comments