I mistakenly enabled encryption master key on an existing installation

As the title says, after smoothly running a Nextcloud server for 2 years and since version 13 with standard server-side encryption enabled since the beginning, last month I had the very bad idea to enable the master recovery key. I just now realized that files created prior to that date are not accessible anymore. Is there something I can do to recover user data?

Things I tried:

  • occ encryption:decrypt-all; it successfully decrypted recent files, but not those files encrypted before I enabled master key.
  • I disabled master key from the interface and re-run occ encryption:decrypt-all; this time it processed the old files, but after it completed successfully files still appeared to be encrypted. Very scary.

I know it’s my fault, no need to point it out. I just need to recover those files, any help would be greatly appreciated. Thanks.


Nextcloud version: 18.0.1
Operating system and version: Ubuntu 18.04
nginx version: 1.16.1
PHP version: 7.2.24

Did you take a look on the forum here and the bug tracker?

I stopped following these topics and I stopped using it myself because of issues and the little benefit on local storage. For this reason, it is even more important to have recent backups and a tested recovery procedure. I think some managed to recover files but I don’t remember if that was related with the master-key solution or even before.

1 Like