Failed to load the specified file! The file is corrupted.

Baz Wong
  • Baz Wong

    Baz Wong - 2014-04-16

    I have been using Keepass 2.x for years and it has served me well.

    2 days ago was the last time I used it and it was fine.

    This morning, I logged in and I got an error message:
    "Failed to load the specified file! The file is corrupted."

    I did the following:
    1. I upgraded my Keepass to the latest version 2.26 and it still failed.
    2. I ported my database to another PC and tried it there and it also failed.
    3. I tried logging into same file with my Ipad using miniKeepass and I managed to login.

    This is a little strange. I can also log on to one of my older files, but not to others old files. Some of them gives the following error message:
    "Failed to load the specified file! The file is corrupted. The composite key is invalid! Make sure the composite key is correct and try again."

    What can I do to safe/recover this database? Can I re-import it?

    Please help.
    Thank you.

  • wellread1

    wellread1 - 2014-04-16

    Re-verify that you are entering the correct Master Key. Verify that only those boxes that need to be checked on the 'Enter Master Key' dialog are checked e.g. a blank password is different from no password. Press the reveal password button '...' to the right of the password field on the 'Enter Master Key' dialog when you enter your password if any. If you use a key file make sure you have selected the correct key file.

    What can I do to safe/recover this database? Can I re-import it?

    You can't recover the database if you can't decrypt it. But you might be able to obtain known good copies of your database from various sources that can be opened, or you might be able to repair a damaged file, provided that you have the correct Master Key.

    • Check to see if there is a Windows Previous Version of your database that you can recover.
    • Since the file on your Ipad is known to be good, you can copy it to your PC and open it there (The file on the Ipad is a different file from the one on the PC, but it has the same content and file format).
    • If you use a file service such as dropbox you may be able to recover a previous version of your database.
    • Files of all types can get corrupted (very rarely). If you know the the Master Key is correct then you can try repairing it. Repair won't work if the Master Key is incorrect.

    The problem of not being able to open various old files is most likely an issue of not supplying the correct Master Key, assuming you haven't had problems in the past. Or widespread file corruption could foreshadow a hard drive failure. The former seems more likely.

    Going forward: database backup can provide protection against file corruption.

    Last edit: wellread1 2014-04-16
  • Bill Denniston

    Bill Denniston - 2015-04-13

    I love KeePass. It is a great password manager. I can manage and sync my password database on my PC, my iPad, on my wife's MacAir, and on my Android phone. Incredible !!!

    However, I too had the problem described by Baz Wong. It was very frustrating and before I found the cause, I would have to rebuild my KeePass DB from an old backup copy. The cause of my DB corruption problem may not be the same as the cause of your DB problem, but it may point you in a fruitful direction. My DB corruption problems related to the way I keep the DB synchronized across all my devices.

    I use Cloud Station on my Synology NAS drive (Cloud Station is like a private DropBox) to keep the DB on all devices synchronized. Additionally, I need different clients on each device. As it turns out the Android client "Keepass2Android" appears to keep the DB open to use its QuickUnlock feature. So before I can access the DB from another device, I must close and synchronize it on my Android phone. Once I do this, no more corruption problems.

    I hope my problem resolution might help someone else.

  • Paul

    Paul - 2015-04-14

    This shows how important it is to regularly backup your database - it is your most important file.

    cheers, Paul


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks