Backing up empty directories/subdirectories

Due to actions like file deletion, renaming files and moving files, it is possible at times that there exist empty folders under the "d’ directory and its subdirectories in the Cryptomator Vault. I have searched the forum and found maybe 2 or 3 entries; however, it is still not 100% clear to me if it is absolutely necessary to backup all empty directories/subdirectories.

My understanding it is absolutely necessary to backup up all empty directories/subdirectories in order to maintain the Vault directory structure so that you achieve an integrity complete restore when the need arises to make a restore from the backup.

I think this is important to understand as some or even many backup software tools do not backup directories and/or subdirectories which are empty.

Is my understanding correct?

regards

Rule of thumb:

  • Empty directory <vault>/d/XX/YYYYYYYYYYYYYYYYYYYYYYYYYYYYYY/ is important and should not be deleted to maintain integrity of the vault.
  • Empty directory <vault>/d/XX/ could be deleted but you have to make sure that the vault directory is 100% available (e.g., fully synced with a sync client if stored in a cloud storage).

In general, you shouldn’t manually rename/move/delete anything inside the vault directory (except you absolutely know what you’re doing). I just wanted to clear things up from a technical point of view.

2 Likes

Thank you for the reply.
This is exactly what I needed to know and shows that if I backup my vault that I need to be sure the backup software will backup all empty directories/subdirectires to be safe and sure the vault integrity is maintained when it comes to a restore.
This would also apply to copy/sync tools as not all these tools copy/sync empty directories/subdirectories by default.

I did not realize empty directories are being created within a vault. This explains why I am having problems with my cloud storage provider where I just learned they filter out empty directories in the upload to the cloud. So, when I go to download content from the cloud, I find the vault uploaded is different in counts from the vault I download. However, I cannot determine what is missing as everything is encrypted and I have no idea what directory in an unencrypted state is being referenced. Apparently, the cloud provider has no interest in solving for this as it saves space for them.

Aside from the differences in files\directory counts, the unencrypted content download from the cloud appears to match the unencrypted content uploaded, unless I am overlooking something?

Can you explain more in what instances are empty directories created in a vault? Does it make sense I don’t see anything missing or is this going to bite me one day?

To be honest, it’s not ideal. The first case I’ve mentioned could be problematic. You could argue that empty folders wouldn’t matter anyway since they don’t contain anything. But who knows how applications work.

You can check if you’re affected by this using the “Health Check” inside “Vault Options”. It would report errors during the “Directory Check”.

So, how does Cryptomator deal with this?

  • If you unlock your vault, you won’t see the affected folder. It’s just missing.
  • You can create or rename a folder with the name of the affected folder without any issues.
  • You can not create or rename a file with the name of the affected folder. It will result in an error.

Thank you for the reply. I have a better understanding of what is in play. I have asked the cloud provider previously to make the removal of empty folders during an upload a user option but they have not done so. I will go back once again and then I am left with a choice to find yet another provider. It seems it is a common practice among some providers to save storage, supposedly for the benefit of the user to not pay for storage you don’t need but I suspect it saves them money too. Some providers also remove what they deem to be duplicate files and that also causes problems. You cannot easily determine what they are doing behind the scene until you use them which is a waste of time.

However, as the great development effort in Cryptomator continues, possibly something to keep in mind to have Cryptomator avoid creating empty directories altogether. Many thanks