vwxyzjn / portwarden

Create Encrypted Backups of Your Bitwarden Vault with Attachments

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Exporting vault fails

AElvik opened this issue · comments

I attempted to create a backup of my vault using Portwarden, but it fails on one item (a certificate).

Output from console:

    portwarden_windows_amd64.exe --passphrase b... --filename backup.portwarden encrypt
    ? Master password: [hidden]
    (*exec.ExitError)(0xc0421160a0)(exit status 1)
    (string) (len=20) "failed item ids are "
    (string) (len=36) "8[...guid here]"
    (string) (len=32) "m[...some random id here]"
    (string) (len=41) "[Attachment name here, it is a pfx-file]"
    encryption failed: exit status 1
    2020/04/29 10:59:38 exit status 1

This is the error from version 0.1.1, it is the same result from 1.0.0, but the error code is 0xc0000043a0. Also tested portwarden_windows_386.exe v 1.0.0, with same result.

Exporting the item and the attachment using the BitwardenCLI works as expected.

Hi, thanks for reporting the bug. Couple things, what is your Bitwarden CLI version number? And when you are doing the backup, did you try exporting the specific item with attachment that the error message suggests?

A long time ago I seemed to have this issue once, I roughly remember solving it by renaming the attachment or the item somehow...

bw -v
1.9.1

I exported the item and the attachment using the bw CLI with no problem.
Is there any way to backup only this item (or ignoring it) using portwarden? (Or what did you mean by "did you try exporting the specific item with attachment that the error message suggests")?

I will try to rename the attachment and see if that works

Please let me know how it goes and if you narrows down to a specific item or attachment that’s causing the issue using the error message.

Sorry for the long feedback delay.

I renamed the items in the vault that was causing the issue, and it now works.

The problem was the entry, not the attachment. This was a certificate password with the certificate attached, so the entry was named ".domain.com", and when this was exported it atempted to create a folder named ".domain.com", and that is illegal in windows i guess. Renaming this entry to "star.domain.com" works.

Renaming works for me, but i guess you could escape that name when exporting, not sure how you would get restore to work thou.

Thanks for the help.