Sanitizer: How to Use

Sanitizer is a tool which can detect problems in Cryptomator vaults and restore lost data.

Currently, Sanitizer is only available as a console application. Eventually, we will integrate it into Cryptomator. For now, follow the instructions on how to use Sanitizer.

Java Installation

At first, you need to have Java 9 or newer. The latest version of Java can be found here.

To verify you meet the minimum required Java version, you can simply invoke the following command via your command line interpreter:

java -version

Running Sanitizer

Now you need to download the Sanitizer jar file. Afterwards you can run Sanitzer.

To do that on Windows, open the command prompt (Start Menu > Enter “cmd” and press enter) and enter the following command:

java -jar C:\path\to\sanitizer-0.15.jar check -vault C:\path\to\vault -deep

Replace the paths C:\path\to\sanitizer-0.15.jar and C:\path\to\vault accordingly. You can open an Explorer window and drag and drop the JAR file and vault directory into the command prompt to insert the correct path.

This video shows how to do that on macOS.

After running Sanitizer, the files *.structure.txt and *.check.txt are created. Those files contain some information about your vault (a list of the (encrypted) files and a problems report).

Advanced Usage

If you’re looking for a way to restore missing file extensions after using the decryptVault command, please read this guide: Sanitizer: Restore Missing File Extensions

3 Likes

Java 9 issue:
The current default install (at least for Windows 10 64 bit) seems to be 1.8.0_191 (that is JavaSE8)
The next higher I can find is Java SE 11 - but only the JDK, no JRE.
https://www.oracle.com/technetwork/java/javase/downloads/index.html

How to make Sanitizer run…?

You can use any higher JRE or JDK. I.e. JDK11 is fine.

Thanks for the quick reply.
There seems to be no installer for Java >8 and the manual install of the currently downloadable SE11 seems to require some effort and expertise.
I found an installer for Java SE 10 on our intranet via our comporate softwarecenter and the Sanitizer now works for me.
If somone can point to a public downloadable executable installer for Java 9 or higher, that would be helpful for others while Oracle is stll pointing to Java 8 as the default.

You can find the latest version of the OpenJDK here.

Is there still a support email address we can send the logs to as in the OP? I can’t see the address on your site, and I would rather not put the logs up on the forum or GitHub publicly.

I get “Check failed: Vault version mismatch. Expected: 6 Actual: 7” with Cryptomator 1.5.4 (exe-166) being installed on Windows.
Seems the sanitizer is not yet able to handle the new vault format?
Would be worth a hint in the description if true - if not, what am I doing wrong?

That’s correct.
There are plans to integrate similar functions into the desktop app.

Hi - Any chance there will be an update to Sanitizer? I’ve lost closed to 50 GBs of data due to lovely OneDrive and cannot use the current version due to the “Check failed: Vault version mismatch. Expected: 6 Actual: 7” issue

Murphy’s law is coming always when you don’t want it, I just lost a very important file in my vault, maybe by corruption. I just discovered “Sanitizer”, but down on one’s luck I doesn’t work with last vault version.
Is there a way to downgrade a vault and then repair it with Sanitizer ?
Thanks a lot in advance.

Hello,
I downloaded sanitizer souce code. Maybe I can help to a dirty modification that can work with version 7 vault. I’m not a Java fan neither specialist (I learned that 6 years ago at school), but I understand a little.
I really need to know if I can rescue my file :frowning:

Sorry for dredging up an old thread (in my defense, it is near the top of the list of “all time” threads).

Is it correct that the Sanitizer function has been incorporated into the “Health Check” of the Windows Desktop version? (I have version 1.6.5)

Yes that’s correct.
Cheers

1 Like