Existing files not encrypted after enabling server side encryption

Hey guys,

I have activated server side encryption using the “default encryption module” on my Nextcloud 21.0.1 installation and am facing the following behaviour:
New files I create, or which I update are being encrypted. Existing files are not encrypted.
How can I force encryption of all files? Is there a command to to that?

Thanks a lot in advance
Stefan

1 Like

Hey there, hope you are doing well…

If you want to encrypt the data that already was in your storage, run this:

sudo -u apache /path/to/your/occ encryption:encrypt-all

PS.: Remember to change the “/path/to/your/”, it should be something like “/var/www/html/nextcloud”.

All the best, stay safe mate.

Also, if you have time to, read the encryption manual and best practices here: Encryption configuration — Nextcloud latest Administration Manual latest documentation

:smiley:

1 Like

Thanks for your help!

1 Like

You’re welcome mate.

Hope it worked, have a nice weekend!

:smiley: