Skip to content

Backups created successfully, but restore/import fails in both bitwarden and raw modes #62

@sk8er000

Description

@sk8er000

I can create backups successfully with BackVault, but I am unable to validate restore/import.

I tested both encryption modes:

  1. "bitwarden" mode
    The backup file is created successfully as ".enc", but importing it with Bitwarden CLI fails with:

    • "The decryption operation failed"
    • "no elements in sequence"
  2. "raw" mode
    I can decrypt the ".enc" file using the Python script from the README, but importing the resulting ".json" into another Bitwarden account still fails with:

    • "no elements in sequence"

The README states that "bitwarden" mode uses Bitwarden's native encrypted JSON format and can be restored into the same or a different Bitwarden account via:

bw import bitwardenjson /path/to/backup.enc

In my case, that restore path does not work.

To Reproduce

"bitwarden" mode

  1. Deploy BackVault against a self-hosted Vaultwarden instance.
  2. Complete the one-time setup UI successfully.
  3. Let BackVault create the initial backup in "bitwarden" mode.
  4. Try to import the backup with Bitwarden CLI:

bw import bitwardenjson /path/to/backup.enc

  1. Enter the master password and import file password when prompted.

"raw" mode

  1. Create a backup in "raw" mode.
  2. Decrypt it using the Python script from the README.
  3. Import the resulting JSON into another Bitwarden account.

Actual behavior

"bitwarden" mode

Import fails with:

ERROR bitwarden_crypto::store::context: error=The decryption operation failed
ERROR bitwarden_vault::cipher::cipher: error=The decryption operation failed
Failed to encrypt ciphers in batch: CipherError: The decryption operation failed
no elements in sequence

"raw" mode

The file decrypts successfully, but the resulting JSON still fails to import with:

no elements in sequence

Expected behavior

At least one of the documented restore paths should work:

  • "bitwarden" mode should be importable with:
    bw import bitwardenjson /path/to/backup.enc
  • "raw" mode should decrypt to a JSON export that Bitwarden can import successfully.

Environment

  • BackVault image/tag: "latest"
  • Vault backend: self-hosted Vaultwarden
  • Vaultwarden deployment: Docker on Linux
  • Bitwarden CLI version used for restore test: "2026.3.0"
  • Restore target: another Bitwarden account used only for disaster recovery testing
  • Access path to Vaultwarden: HTTPS via Cloudflare Tunnel for normal GUI access

Additional context

I compared the top-level JSON keys of two files:

BackVault "raw" backup after decryption

['encrypted', 'folders', 'items']

Bitwarden GUI encrypted export

['encrypted', 'passwordProtected', 'salt', 'kdfType', 'kdfIterations', 'encKeyValidation_DO_NOT_EDIT', 'data']

This suggests the BackVault-decrypted "raw" JSON is not the same format as Bitwarden's password-protected encrypted export, which is expected, but the resulting JSON still does not import successfully.

Also, for "bitwarden" mode, the restore/import failure seems to contradict the documented restore instructions.

Questions

  1. Is "bitwarden" mode currently expected to work when restoring into a different Bitwarden account?
  2. Is "raw" mode expected to produce a JSON file directly importable by Bitwarden Web/Desktop?
  3. Are there any known compatibility issues between:
    • BackVault
    • Vaultwarden
    • current Bitwarden CLI versions
  4. Would you like me to provide:
    • the exact BackVault image tag
    • sanitized docker-compose
    • sanitized sample JSON structure
    • full logs from backup creation and restore attempts

Logs

"bitwarden" mode restore attempt

ERROR bitwarden_crypto::store::context: error=The decryption operation failed
ERROR bitwarden_vault::cipher::cipher: error=The decryption operation failed
Failed to encrypt ciphers in batch: CipherError: The decryption operation failed
no elements in sequence

"raw" mode JSON structure comparison

BackVault decrypted JSON keys:
['encrypted', 'folders', 'items']

Bitwarden GUI encrypted export JSON keys:
['encrypted', 'passwordProtected', 'salt', 'kdfType', 'kdfIterations', 'encKeyValidation_DO_NOT_EDIT', 'data']

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcould not reproducecould not reproduce the reported issue/bug/error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions