Migrate OC from Ubuntu OC9 to Centos7 OC10 with encryption


#1

Hi there,

i have some error messages because of encryption errors.

So I want to set up a new server for OC.

Old system:
Ubuntu 14 + OC 9.1.7

New System
Centos 7.4 + OC 10

The steps to go i found there:
https://doc.owncloud.org/server/10.0/admin_manual/maintenance/migrating.html

I want to start without encryption and enable encryption afterwards to solve all encryption errors.

So i hat the plan to use
occ encryption:decrypt-all
on the old server before migrating data to the new one.

But what about subolders in each data directory?
-- files_encryption# ls
------- keys
------- OC_DEFAULT_MODULE

Please help :slight_smile:

Thank you.


#2

In the docs there is the exact same command you have, so it's the right command to decrypt all files.

https://doc.owncloud.com/server/10.0/admin_manual/configuration/files/encryption_configuration.html?highlight=encryption#encrypt-and-decrypt-data-files-for-all-users

after that, you should disable encryption

https://doc.owncloud.com/server/10.0/admin_manual/configuration/files/encryption_configuration.html?highlight=encryption#id1


#3

thank you @dmitry

what about subfolder files_encryption and its subfolders and files after decrypting and disable encryption?
how shoud i handle?


#4

I don't quite understand your question. How should you handle what exactly? Executing the commands or cleaning up? Are you concerned the folders that were used for encryption stay there even after the encryption is turned off?

If you follow the docs your files should be decrypted and then you can turn off encryption with the commands from the documentation and then you can migrate to another server.


#5

hi dmitry,

yes, agreed.

i mean in each data directory of an user there are subfolders:
cache files files_encryption thumbnails

i thought i have to clean up files_encryption folder in each directory before migrating?
or doesn't it matter the folder is still existing?


#6

After you decrypt and turn off encr., you can delete everything with encryption in the folder name that you see.
I don't know if you have to do it, you could just leave it there.


#7

Thank you very much, i'll try step by step now.


#8

Let me know if it worked or if you need help


#9

hi @dmitry,

sudo -u www-data php occ encryption:decrypt-all

Please enter the recovery key password:

I thougt it is recovery password which i set on installation.
but there is an error:

[OC\Encryption\Exceptions\DecryptionFailedException]
Encryption library: Decryption (symmetric) of content failed: error:0607A082:digital envelope routines:EVP_CIPHER_CTX_set_key_length:invalid key length

which recovery password is ment?

thank you.


#10

I can't tell you the recovery key password since you set it up

here is what I have found in the docs:

https://doc.owncloud.com/server/10.0/admin_manual/configuration/files/encryption_configuration.html?highlight=encryption#how-to-enable-users-file-recovery-keys