Unencrypted data is significantly smaller than whole folder

I synced my data recently to a new device and while the size of the folder is the usual, the unencrypted vault is like 10x smaller and many folders and files are missing. What could cause this?

Welcome to the Cryptomator Community :slightly_smiling_face: ,

If you look into the log files of Cryptomator, are there any error messages (WARN, ERROR or Exception)

Missing directory files due to incomplete sync. Cryptomator flattens the internal directory structure and uses linkfiles (dir.c9r) to keep track which directory is contained in which one. Some sync apps occasionaly miss to sync those files due to their small size, leading to missing directories. See also Security Architecture — Cryptomator 1.7.0 documentation.

If the dir.c9r files cannot be recovered, the directory becomes orphaned, such that you cannot access it anymore and all filenames inside the directory are lost. With the upcoming 1.6.0 version you’ll be able to reintegrate the directories into the filesystem hierarchy, but filenames & extensions cannot be recovered.

Yes I seem to have a lot of WARN o.c.c.dir.BrokenDirectoryFilter - Broken directory file errors which is bad I guess. So I cannot do anything at all?

Firstly check if the complete vault is synced to your new device. A non-excat indicator would be to compare the number of files and the total size of the encrypted vault folder via the file explorer on both devices. Please make sure to compare the encrypted folder in your sync client location not the mounted one in the unlocked state.

I’m using OneDrive btw, only vault 1 is damaged. Tested and synced on Windows this time. Same results as with previous ones on Linux. I used this too to sync with Linux: GitHub - abraunegg/onedrive: #1 Free OneDrive Client for Linux Worked fine before. Possible I screwed up the resync, if all things fail I go back to the Recycle Bin in the cloud and try to recover some deleted files from a few days ago when I had to resync the whole vault. Those are the only major deletions I observed. I have also saved everything I can. Windows and the OneDrive interface seem to count the sizes a bit differently.

Results:


Cloud:

449 GB Root folder - 140 608 items

447.4 GB Vault 1 - ??? items

1.6 GB Vault 2 - ??? items

4.7 MB Apps - ??? items


Local:

446 GB Root folder - 128 791 Files, 11 780 Folders = 140 571‬ items - 37 items missing on sync (There is an additional “Forms” folder in the Root folder but that does not get synced)

445 GB Vault 1 - 128 390 Files, 11 706 Folders = 140 096‬ items

1.57 GB Vault 2 - 67 Files, 65 Folders = 132 items

1.77 MB Apps (2.51 MB size on disk, idk what this means) - 332 Files, 6 Folders = 338 items

Local mounted:

18.4 GB Vault 1 - 22 053 Files, 943 Folders = 22 996 items


Comparisng Vault 1:

Cloud: 447.4 GB - ??? items
Local: 445 GB - 128 390 Files, 11 706 Folders = 140 096‬ items
Mount: 18.4 GB - 22 053 Files, 943 Folders = 22 996 items

If I understand your intensive research correctly, you are missing 2.4 GB locally that still have to be synchronized, which is a lot, especially if you remember what @infeo wrote above:

This can have a significant impact on what is accessible in the unlocked state especially if 2.4 GB are still missing (a dir.c9r file requires 36 bytes of storage, so it could be some of them, but certainly also some other files) but don’t worry, as soon as the synchronization was successful, all folders and files should be visible again…


But the crucial thing is that these files are synchronized. Maybe there is a force sync button or something in the sync client? Unfortunately I don’t know this OneDrive Sync Client for Linux and can’t help any better at this place.

I have synced every single bit of data with the native OneDrive client on Windows when I tested (same results though). So if it’s not synced, it does not exist. I try to screw around in the recycle bin. Thanks for the help.

Update 1: I have checked the bin online and yes there are dir.c9r files and others deleted on the same suspicious day. So yeah. Wish me luck.

If everything is synced, I don’t understand the size-diff between this folder in the cloud and locally

The theory is that OneDrive calculates the storage of the deleted files in the recycle bin on the original location?

I keep my fingers crossed :crossed_fingers:

Update 2: I recovered the deleted files and yup it seems like everything is back. Thanks again for the help. I guess now I go and reevaluate my life lul.

2 Likes

… and think about backup strategies, which is different from synchronization (and complements it). :wink:

2 Likes