Error adding masterkey key to vault - Dokany

I lost the folder “d” was deleted accidentally. I manage to recover all the encrypted files. But I don’t know how to make it work again, to create this folder “d” again.

Create a folder that is named after your vault and place it anywhere. Let’s say c:/somefolder/myvault.
Then create a folder „d“ in „myvault“.
Place all files and folder of your former deleted vault „d“ in it.
Place the Masterkey file in the folder „myvault“.
Open the app, select „add existing vault“, select the Masterkey file and pray that really all encrypted files and folders are restored correctly. Otherwise your vault will show as empty or just some of the files are there.

See vault structure in documentation (the box right after „Becomes a ciphertext directory structure like this“)

I personally do not recommend this as there is a lot of potential to mess up the vault structure.
Asumeing you have backups of your unencrypted files, I would recommend to create a new vault and start from beginning.

It didn’t work unfortunately, I manage to open the safe! and the result was empty folder. I only have the encrypted files. I don’t know what to do now.

If you do not have a backup (either of your vault or your unencrypted files), I’m afraid you lost your files.

I have the backup of the safe, I have the masterkey key too and the files encrypted. I’m just not being able to decrypt the files. Just had no but the folder ‘d’ that had been deleted. When I created a new ‘d’ folder with the masterkey key and the backup together. Every time you open an empty folder in the vault. I reinstalled the machine from scratch Windows 11 and still continued the folder “d” that had created earlier, so it was at the roots of the pc.

with the backup key can I decrypt the files?

I’m not quiet sure if I understood it correctly but you have a backup of the vault folder? With vault folder I mean the folder with the name of the vault including the masterkey.cryptomator-file and the d-folder. If so there should be no problem by restoring both (all files and folders of the d-folder and the masterkey-file) everything should work again. If you lost the masterkey-file but still have the recovery key you’re fine too. If you lost the d-folder nothing can be done as the d-folder contains all the encrypted data and obviously with key-material you cannot restore the complete content (data) of the vault.

So the first question is, did you have a backup of the d-folder or did you created a new empty folder or incomplete one?

Main Folder ‘d’ Was accidentally deleted after downloading from cloud on pc. I used a program and recovered the encrypted files inside my pc. What I have at the moment is - (Masterkey Key, Masterkey.criptomator.bkup, vault password and the encrypted files.) The question is, can I decrypt with these keys along with the encrypted files? Or there is no way out because a main ‘d’ mass has been deleted. Would there be a way to try to remount a folder using the backup key?

Sorry but I still have not yet fully got it :sweat_smile:

What exactly did you recovered? All files and folders including those inside the d-folder or what exactly?

If you have the masterkey-file or the recovery key and the encrypted files inside the d-folder you’re fine.

Depending on the first question as the encrypted files are placed in this d-folder.

As I understand you still have a valid masterkey-file, then those backup keys doesn’t bring you a benefit as they just backup the crypto-keys where you already have “the latest version”.

Ok, when I say that I recovered the encrypted files, I mean everything that has the
extension (c9r). Now in the matter of recovering the specific folder ’ d ’ I didn’t try to look for it inside the pc when recovering the files.

The main recovery key I have! the encrypted files was recovered one by one inside its folder. What I didn’t remember was to retrieve the specific ‘d’ folder. Because the search focused on files ( c9r ).

The recovery keys I have are the core of the core files. (Old Backup Keys).

These are the keys I have! I put the files in a new ‘d’ folder to try to decrypt and open the vault. The vault only opens with the empty folder. Since it contains encrypted files inside.

Thanks for the explanations.

Can you please open the d-folder where the recovered .c9r-files are located. Are the folder structure similar to the following (not exactly but similar):

.
├─ d
│  ├─ BZ
│  │  └─ R4VZSS5PEF7TU3PMFIMON5GJRNBDWA
│  │     ├─ 5TyvCyF255sRtfrIv**83ucADQ==.c9r
│  │     ├─ FHTa55bH*sUfVDbEb0gTL9hZ8nho.c9r
│  │     │  └─ dir.c9r
│  │     └─ ...
│  └─ FC
│     └─ ZKZRLZUODUUYTYA4457CSBPZXB5A77
│        └─ ...

That’s how the recovery folder, the folder ‘d’ was the one i created and put the files inside.





Hmm, the structure looks basically good.

Can you please enable debug mode, try to unlock this vault and send me the log file? With debug mode enabled, the paths of all files you encrypted are stored in the log file so please make sure that this is not a problem for you or censor them.

Look at the file log.

cryptomator0.log (39.9 KB)

Thanks for the log file. Can you please check using the file explorer what inside this folder is C:\Users\[username]\Documents\Backup\Arquivos Confidencial\d\TB\IRKA7VOCLN2BM3QBS22TNWC6FQXHIX\y4zx9x_bxFXyYVxuNTBtBqej2xSvyFMDStgBtPLOCEUk.c9r ?

There’s nothing in that specific folder, it’s empty!

I put a file in this specific folder and manage to decrypt 2 files. ( dir.c9r )


Get another file to open another folder, these are the first 2 folders i started before i got to my files.



only get for now these 2 folders.

Yes, that’s what I thought, those dir.c9r-files are very important for the folder structure.

But it means that not all files where restored from the backup. I would recommend to check the diff between this folder in the backup and the recovered one but nice that you got to your files back :tada:

I made a short video for you to see how messed up the briefcase is. There is folder that has the dir.c9r file and has others that do not have! Do I have to assemble one by one each folder in the structure?