I would like to be able to move a working ERPNext server from one VPS server to another VPS server. However I do NOT want to make an image of the original server to do it.
I am asking if anyone has ever done this by just copying all of the directory structure and contents from one server to another and had it work?
If you were able to do this, can you point me to a process that allows this to work?
Of share some details about what you did?
BKM
EDIT - Several posts, but they all missed the point so far. I am not able to re-install my version of erpnext so I need a way to move a working erpnext installation from one server that is failing, to another server that is new. The servers are of different hardware types so I cannot use an image of the original server either.
I am looking for a way to āmoveā a complete erpnext installation from one server to another WITHOUT installing it on fresh server, and WITHOUT making an image of the first server.
Since it is not possible to install my version of ERPNext any longer, I need to move it by some other means.
If it were as simple as installing erpnext again and moving my backups, I would not have posted the question.
Still looking for anyone that has made a copy of one server and moved it to another server without using an image of the original server.
In my case, I almost exclusively setup a single VPS for each erpnext installation. The workload that I have them doing would really bog down in a multi-tenant environment. This is why I am trying to move the entire installation to a new server.
Iām trying to understand why and image is not a viable option and canāt seem to find one, except for the fact that you may need to upgrade the new VPS or something.
With the workload you have described and the benefit of VPS is you can easily upscale capacity (memory, disk, cpu) without the need to migrate, unless you have them configured differently.
In response to you requirement, creating an image is your best option of migrating to a new VPS. (Until I understand why you donāt want to use an image)
An image is not possible because the hardware that the original server is running is not compatable with the hardware of the available new servers. This would mean the linux kernels would be in panic mode and would never boot. However the problems go even further.
The original server that is failing is running on older AMD processors and the new servers are all Intel processors. Additionally the server of the original VPS is with a service provider that appears to be going bankrupt. The new VPS on newer hardware is a different service provider and will not/ cannot take an image from another service provider.
These are the reasons an image is not a viable option.
I move sites multiple times, from a server to another or from a multitenant configuration to a single tenant.
The key is to create a backup with bench backup, database backup are stored in my_site/files/private/backup/
So here my workflow :
In the new server :
Install bench manually or with installation script
Setup a new bench with specific frappe version bench init --python python3 --frappe-branch version-11 my-bench for example
From your new bench instance get your app : bench get-app --branch version erpnext
Next is where you will need to copy files from your backup server to your new server in a backup directory (not inside the current bench)
Get your backup site (only the site folder is required unless you have configured some elements globally)
unzip your last database backup inside your new server : gunzip my_site/files/private/backup/my_sitexxxx.sql.gz
From your new bench install a new site with this backup : bench new-site --source_sql /full/path/to/your/backup.sql my_new_site Now you will have your site inside your new bench
Copy files from your backup inside your new new site : cp -R backup/my-site/files/private/ my-bench/sites/my-site/files/ and cp -R backup/my-site/files/public/ my-bench/sites/my-site/files/
Next you must copy the āencryption_keyā from your backup my-site/site_config.json, to your new-site if you want to be able to read emails in your new instance
now all is prepared to run the bench setup production, bench setup lets-encrypt and another bench update
I have script that in a bash script to ārestore-siteā with all this steps in my servers.
And I also backup only datas (databases, files folder and site_config.json)
This is the best answer so far, but it still requires a bench update.
I cannot install the version of bench that was available during the v10.0.14 release. It is not available any longer.
Also if I run bench update on that older version is breaks everything in my system. There is something about the version of bench that was active at v10.0.14 that never was able to survive an update. Bench evidently changed before the release of v10.1.x and it is this transition that breaks every time. I have tried this path before.
Again, I am still looking for a way to move an existing erpnext installation to another server without doing an install and without a server image.
This may not be possible, but I still want to ask just in case someone has been successful.
To manually update in specific version :
In each apps, set your git checkout to the specific version you want
Next in your bench folder use bench update --patch and bench restart if this is a production setup
Now you can manually control the frappe and erpnext version.
Its possible. The reason someone isnāt going to be able to give you step by step instructions is there will be a lot of āit depends onā questions.
What OS
What version of ERPNext
What version of Frappe
pip packages installed and versions of each package
node packages installed and versions of each package
os packages installed and versions of each package
(iām probably also missing some needed detailsā¦)
using this information, someone would most likely be able to recreate the installation for you, but it would take some time.
maybe ask someone for assistance to complete this (someone like Brian Pond as an example), and as part of your contract with them, ask for the step-by-step instructions at the end for this particular project. That could potentially also help you learn more about the inner workings of erpnext/frappe and help you become less reliant on the easy install scripts. Based on your posts, the easy install is one of your largest pain points, so this is one possible way of addressing that.
I had done that. In fact I had paid a popular ERPNext consultant and developer in India that is part of the foundation to try to do this for me and generate a document for me to be able to replicate it.
Sadly, after 2 weeks of trying, they informed it it could not be done.
I will attempt it again using the @jodeq ideas and see if I can make any progress this year. This time last year is when I was told it would not work. Maybe they missed something (but I wouldnāt think so).
I remember you referencing this in the past, and if my memory is correct, the scenario was a bit different than the statement youāre making.
I know for certain that the question you ask in this thread title can be done because Iāve seen it done (v10 on one server to v10 on another server). I canāt help you do this, but someone else may be able to.
Itās specific to Linode VPS but the steps used to copy the site using rsync are generic and can be used on most Linux VPS servers. Effectively it uses rsync to copy all the files and and folders from one server to another, then setup SSH keys to new server etc. There is no imaging being done as such.
The notes are similar to revants answer here.
The creation of the new server environment would be done with the specific tools from the VPS provider. The exact version of Linux kernel used and Architecture or and vs intel can be different on the two servers as generally the kernel modules are picked up on the fly - something Windows servers are very difficult with .