I have been copying v10 servers for a long time now. I guess it all depends on how you define “copy”.
In my case I make an image copy of the server and restore the image to a fresh server. Then I perform the steps in this post:
Once that is done I restore a copy of the latest backup to the newly restored server and everything works just fine.
So, If by “copy” you mean that you are making a server image, then this may help.
However, if by “copy” you mean that you are just moving all of the directory structure to a different server, then I would not expect to get a functioning server. The reason for this is the install process of erpnext is extremely dependent on the status of many other supporting programs such as pip, mariadb, python, etc. (there are far to many to name here).
Every install is potentially different even if the versions indicate they are the same simply because of the lack of control you have over the status of the supporting programs. Some of the support programs may be changing daily. This is exactly why I only use complete server images. It is not possible to know what has changed and that means that any two servers are going to be different unless you make a complete server image.
Everyone, thank you for your detailed responses.
Skimming through your provided resources, I’m assuming that files were simply copied, leading to the broken database and that means that even changing the configs and a re-setup of nginx are not going to help.
Originally, the goal was it to have a 1:1 copy of the live server (instead of backup and restore) so we could have the same ERPNext 10 version to have an accurate testing ground for the upgrade to V12.
Our provider, where the server is hosted, said it’s too complicated to just clone the server, so we had to do it ourselves, leading to this mess. I’m probably going to set up an entirely new ERPNext instance, restore a backup of the live system, although our expert warned us that there might be crucial database differences, if we do it that way.
Edit: I could get some more info.
Apparently, it was indeed a full server backup, that we restored in a virtual machine. So from what has been posted so far, this should be the correct approach, just that we should stop the database before copying