mrAceT / nextcloud-S3-local-S3-migration

Script for migrating Nextcloud primary storage from S3 to local to S3 storage
GNU General Public License v3.0
67 stars 11 forks source link

encryption for source versus target stores #6

Closed brainchild0 closed 1 year ago

brainchild0 commented 1 year ago

For migration (local to S3), are local encryption settings duplicated for the remote storage, or are they reset?

For example, is the case supported to migrate a local store that is encrypted into an S3 store that is plaintext?

mrAceT commented 1 year ago

I do not know, I don't use encryption (mostly because I seen trouble with it..), I would suggest you try it. If you don;t have a big setup and have the SQL backup you can switch back quite easily. If you do have a big setup, I'dd suggest you create a same one with the same settings to test..

brainchild0 commented 1 year ago

I have reviewed the flow more closely, and it appears that no decryption is being performed, as would be done when the Nextcloud server reads files through its storage system. Rather, the script simply reads files directly from the file system.

As such, the files will be stored as encrypted in the remote target S3 bucket if previously represented as encrypted in the local file system.

I have no idea whether the locally stored key will be used properly to decode the files once they are transferred to the S3 bucket.

mrAceT commented 1 year ago

You are correct, the data is "simply" copied. Best thing would be to create a small test-setup and try?

mrAceT commented 1 year ago

@brainchild0 Can you confirm (or not) that this migration script works with encrypted files?

brainchild0 commented 1 year ago

Can you confirm (or not) that this migration script works with encrypted files?

I have only confirmed achieving the end objectives on such a target by removing decryption, performed as a separate step, preceding invocation of the migration script.

mrAceT commented 1 year ago

Thank you for responding, I'll close this issue then.