Moving encryption key from old to new server and into a backup of a nextcloud

Greetings,
Is there a straight forward way of finding, copying, and moving the main encryption key from one nextcloud installation to a new installation. I use AWS ubuntu 20.04 server with nextcloud 21+ snap install. I need to know the proper commands to make it all happen. I know how to make a backup, but don’t know how to transfer that into nextcloud on a new server and be able to use the old encryption key to get to my data stored on both the server and external storage using AWS S3. I use the default encryption module for main storage and external. Very much appreciate your time. Thanks

I think you can just make a full restore of the whole setup, files are additionally signed with information from the database. A different database version or a new database will destroy this signature. There are a couple of topics how to restore some data with encryption keys by ignoring this signature.

Thank you for that info. I’ll try to find those topics you mention.