Change location of external storage

Hi everyone,

I have the following problem: I have some files on external storage, mounted via SFTP and encrypted. The storage is mounted as a non-privileged user.

Now for some reasons I want to mount this storage in a different location.

I have the following setup:

Mounted storage in

mountpoint_old

encryption enabled, everything works fine.

So this is what I did:

I mounted the external storage in

mountpoint_new

ADDITIONALLY. The mounting works, I am able to look into the folders and see the files. And of course I am not able to open the files, as they are encrypted.

So in the next step I took a look in
data/<user>/files_encryption
and copied all the keys from
data/user/files_encryption/keys/mountpoint_old
to
data/user/files_encryption/keys/mountpoint_new.

Now I expected to be able to open the files when entering them through mountpoint_new. But I am still not able to.

So my questions:

  • Are there any additional steps, I missed?
  • What do I do, when I want to mount encrypted external storage in a different instance of nextcloud?
  • Does the command occ encryption:decrypt-all [username] actually decrypt the files on the external storage or just in the nextcloud instance?

Thanks for your help!

Richard