Migrate from GitHub to SourceForge with this tool. Check out all of SourceForge's recent improvements.
Close

Backup

Paul
Attachments
CaptureDBname.png (21156 bytes)
CaptureDBnameV1.png (14183 bytes)
CaptureKEY.PNG (19948 bytes)
CaptureKeyV1.png (15735 bytes)
CaptureWUC.PNG (19917 bytes)



Backup Your Database


Overview

KeePass does not have backup built-in. This may be seem to be an oversight, but as your password database is very important, it is left to you to determine the backup that suits your situation, rather than impose a system that may not work for you.

KeePass can export your data but this is not a good solution as the data will then be stored in plain text, however it may be useful if you want to store a hard copy.

KeePass has some backup plug-ins but not all are well supported. Or you can roll your own with a batch file, trigger or both.

There are also excellent solutions that are independent of KeePass and will backup your other important files as well. Windows has a built in backup program accessible via control panel. Free / paid products (e.g. Aomei Backuper, Macrium Reflect, EaseUS ToDo or Acronis backup), external hard drives sold with backup programs (WD My Passport with SmartWave), as well as free or paid cloud backup (e.g. Crashplan, Google Drive) are all reasonable solutions. A web search will find additional solutions.

Top


What to Backup

KeePass stores all your passwords in a single file called a database. The default name for this file is Database.KDB in KeePass V1 and NewDatabase.KDBX in KeePass V2. This is the only file you need to backup if you only use a master password to unlock your database. Additionally you may need to backup a key file or your Windows profile if you use other / additional sources for the Master Password.
It is also worthwhile backing up the KeePass configuration.

Database Only

To find where your database is stored in KeePass V1, set KeePass to show the full database path.
Tools > Options > Advanced, Advanced, Show full path in the title bar...

  Location

To find where your database is stored in KeePass V2, look in the KeePass unlock window.

   Location

Key File

If you use a key file it will be shown in the KeePass unlock window. It also shows where your key file is stored.

  Location    Location

Windows User Account

If you use the Windows user account as (part) of your master key you will see a tick in the "Windows User Account" box in the KeePass unlock window.

  Location

The easiest way to back this up is to make an image backup of your disk. See the Windows User Account section of the KeePass Help for further details about backup and recovery.

Note: We do not recommend using the Windows User Account option unless you are know exactly how to backup and restore a Windows user profile.

Your KeePass Configuration

Having a backup of your database is great, but what about all the configuration changes you made and the remote server credentials etc? See the wiki article on Backing up your configuration

Top


When to Backup

You should backup your database every time you make a change to it, e.g. if you add a new entry or change a password. Having your disk fail just after you set a new bank password is not a place you want to be.

You should always backup your database before you change the database password, upgrade your machine, format a disk, buy a new machine etc.


Where to Backup

Almost any location is good for a backup, as long as it's not in the same place as your existing database. e.g. if you save your database in "My Documents" you should backup to another disk, a USB stick or the cloud. You can even email the database to yourself, or just save it in a draft email - unless the email password is in KeePass, of course.


How Many Copies Do I Need?

Create as many copies as you think you need. Having no backup is asking for trouble, having many is being cautious.


How to Backup

Using a Backup Program

If you have a backup program that you use to backup your data, you probably already have your database backed up. To check, make sure the location where you store your database is included in your backup.
If you use a key file you need to include that in your backup.

Using a Plug-in

Backup plug-ins automate the process of backing up, but you still need to make a decision on where you will store the backup. See the "Backup & Synchronization & IO" section of the Plugins and Extensions page.

Using a Trigger

Triggers allow you to automate some things in KeePass, such as backing up the database before or after a save. The Trigger Examples page has a backup trigger you can use.

Top


Verify Your Backup

There is no point in having a backup if you haven't tested that it works.

  1. Create a temporary location on your hard disk or on a USB key.
  2. Restore / copy your backed up database to the temporary location.
    • If you use a key file, restore the key file to the temporary location.
  3. Open KeePass and cancel any dialogs, including the unlock dialog. You should have a blank KeePass screen.
  4. In KeePass select 'File' > 'Open' and navigate to the temporary location you created above.
  5. Select the restored database and click 'Open'.
  6. Enter your master password.
    • If you have a key file to test, choose the file by selecting the Folder icon on the right of the Key File box and navigate to the temporary location you created above.
    • Select the Windows User Account option if required.
  7. Click OK.
  8. When you have finished testing, delete all files in the temporary location and then from the Recycle Bin.

Methods for verifying recovery of a Windows user account are covered in the Windows User Account section of the KeePass Help.

Top