Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Choose Backup Location #3279

Closed
rwat1 opened this issue Jun 17, 2019 · 26 comments · Fixed by #7035
Closed

Choose Backup Location #3279

rwat1 opened this issue Jun 17, 2019 · 26 comments · Fixed by #7035
Milestone

Comments

@rwat1
Copy link

rwat1 commented Jun 17, 2019

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.

@rwat1 rwat1 changed the title back up Choose Backup Location Jun 17, 2019
@droidmonkey
Copy link
Member

This is a good idea!

@grenzor
Copy link

grenzor commented Jun 18, 2019

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

@mustelid
Copy link

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

@droidmonkey
Copy link
Member

We aren't implementing a version control system here.

@mustelid
Copy link

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.

@droidmonkey
Copy link
Member

droidmonkey commented Sep 28, 2019

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.

@rwat1
Copy link
Author

rwat1 commented Sep 29, 2019

@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.

@beckerj
Copy link

beckerj commented Oct 27, 2019

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

@meersjo
Copy link

meersjo commented Apr 17, 2020

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.

@droidmonkey
Copy link
Member

droidmonkey commented Apr 17, 2020

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.

@meersjo
Copy link

meersjo commented Apr 17, 2020

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!

@idl0r
Copy link

idl0r commented Apr 20, 2020

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?

@droidmonkey
Copy link
Member

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

@idl0r
Copy link

idl0r commented May 14, 2020

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.

@rwat1
Copy link
Author

rwat1 commented May 14, 2020

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

@idl0r
Copy link

idl0r commented May 26, 2020

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?

@rwat1
Copy link
Author

rwat1 commented May 26, 2020

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 :(

@seniorm0ment
Copy link

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.

@mchllngr
Copy link

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.

@rwat1
Copy link
Author

rwat1 commented Nov 29, 2020

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.

@htismaqe
Copy link

Is this something that is being considered for future version? This would be extremely helpful. Right now, our choices are to either manually move the backup or just use manual backup. The auto-backup feature is extremely limited right now because of this.

@seniorm0ment
Copy link

seniorm0ment commented Jan 12, 2021

I personally would not want a sync/backup integrated into keepassxc, but a seperate minimal program to handle it. Many already exist like such, rSync, Borgbackup, Syncthing, etc.

However the db files don't like to Sync at least on Syncthing nicely, it tends to create a fair amount of conflict db files.

Also as I mentioned in the past, I wish I could have Keepassxc set a backup location, anytime I edited the database, it could backup new databases to a second folder, and I can sync those instead of the primary. The benefit being I would be able to add a keyfile to those backup databases that I plan to store remotely, meanwhile the ones locally I can have password protected. Then the remote ones would be automatically updated with ease.
The only way to currently handle 2 databases with different protections is by creating 2 databases, and constantly merging them, or just keep manually copying your databases and signing with keyfiles. Both get kinda sketchy to do manually, and are a PITA manually too.

@htismaqe
Copy link

Sorry, maybe I wasn't clear.

I want the ability to set a backup location, just like you.

Right now, because it automatically saves it in the same folder as the original, we have no choice but to either manually copy (or manually backup) or do some kind of sync.

@rwat1
Copy link
Author

rwat1 commented Jan 13, 2021

Yea, same. Just the option for it to save to another folder, instead of same folder.

@droidmonkey
Copy link
Member

Also allow to choose the file name of the resulting backup, perhaps with a date time placeholder.

@htismaqe
Copy link

Thanks so much for putting this in the 2.7.0 plan. I went ahead and donated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants