What are the steps required to upgrade from v10.x.x (production) to v11?

I know I tried to do the upgrade about 6 weeks ago and could not get it to work. I tripped over several errors including yarn errors, permission errors, and even invalid database errors.

So before I give it a try again, I just wanted to know…

Can anyone provide a sure-fie set of steps to go from a standard v10.xx production config to whatever the latest v11 production config would be?

If so, can you point out any supporting post or just list the commands here?

Any help would be appreciated.

BKM

1 Like

Though I did this a while back, and had some glitches during the process, hence there may be excessive commands in the sequence that aren’t actually necessary… these are the lines from my history related to the v10->v11 upgrade, and which worked successfully for me.

cd ~/frappe-bench/
bench switch-to-branch v11.x.x frappe
bench switch-to-branch v11.x.x erpnext
bench update --patch
cd apps/erpnext/
git config --unset-all remote.upstream.fetch
git config --add remote.upstream.fetch ‘+refs/heads/:refs/remotes/upstream/
cd …/…
bench update --patch
bench update --reset
bench setup requirements
cd apps/frappe && git fetch upstream && git checkout master && cd -
cd apps/erpnext && git fetch upstream && git checkout master && cd -
bench update --requirements
bench --site all migrate
cd apps/erpnext/
git branch -a
git config --unset-all remote.upstream.fetch
git config --add remote.upstream.fetch ‘+refs/heads/:refs/remotes/upstream/
git fetch upstream
git branch -a
git reset --hard
git status
git add .
cd …/…
bench setup requirements
./env/bin/pip -V
yarn -V

1 Like

Thanks Trent, that does look a bit more complex than just the 'bench update && bench migrate" commands.

I will put up a test server tonight and try your steps in the morning to see where it leads.

I will say that I tried:

bench update
bench migrate

and I even rebooted the host. When I went logged into ERPNext as Administrator and checked the versions in the “About” section, it looks like nothing happened. The versions are still the latest v10. So, obviously just using update and migrate are NOT the solution.

Thanks for the detailed commands and I WILL try it and report back.

BKM

@trentmu Thanks. This looks complex. Can it be simplified. Or to other friends, can we find a simpler way since we learned now that the traditional bench update and migrate is not working. To non coders like us who have some production running in version 10,we will need the help of our friends who are coders to simplify the process. Thanks

I will wait and see if these work for BKM, and if not, I will try it again on a test machine and get the right sequence :slight_smile:

I can experiment for you guys. Deploy a V10, load a V10 database and try to upgrade to V11. But I will have to figure out how to install V10 again.

1 Like

To install v10.x.x now, you actually have to first install v11.x.x, then run similar steps to the above, but with v11.x.x instead of v10.x.x to do the downgrade, and then a reversal process to get back up to v11

Report: I followed the steps above and bricked my installation. I now have internal server error.

Critically, the following steps failed:

bench update --reset
bench setup requirements
bench --site all migrate
yarn -V - partial failure. Some files or directories not found but the process seemed to have been completed.

When I get yarn errors, I use this…

npm config set prefix ‘~/.npm’
export PATH=~/.npm/bin:$PATH
source ~/.profile
npm install -g yarn
bench update

I may have done it in the same session as all those other commands, but didn’t link the relevance of it to the other pieces (sorry).

I also see (now) that there are duplicate commands in that list - so I must have discovered some issues and adjusted, but not made any notes-to-self on that process :thinking:

You can also try following steps:

1 Like

Not True!!

You can install v10 on a fresh and updated VPS server by first creating the user account that you want to use as the home location of ERPNext (like /home/frappe). Set the account as a sudo user and then go back to the root login.

From root (not the user account), run the install.py like this:

python install.py --production --user [your user] --frappe-branch v10.x.x --erpnext-branch v10.x.x

This will install everything WITHOUT any errors and it will all be installed in the user account you define with the --user switch.

I have done several of these over the past few days on Ubuntu 16 and 18. It appears to be the ONLY reliable way to get v10 or v11 to install properly when using the install.py script. Installing from any created user account ALWAYS fails.

BKM

2 Likes

Ok, Starting my attempt at this list of commands now. Get back to you in then next our or so.

BKM

I forgot about that option - I normally do manual installs 'cos if something goes wrong on the script I can seldom find the problem, so I just don’t use that :smile:

OK, I tried this as listed and it failed. The failures began with this line:

cd apps/erpnext && git fetch upstream && git checkout master && cd -

Here is the trace for when it was run on my system:

erp_jmi@la:~/frappe-bench$ cd apps/frappe && git fetch upstream && git checkout master && cd -
Branch 'master' set up to track remote branch 'master' from 'upstream'.
Switched to a new branch 'master'
/home/erp_jmi/frappe-bench
erp_jmi@la:~/frappe-bench$ cd apps/erpnext && git fetch upstream && git checkout master && cd -
error: pathspec 'master' did not match any file(s) known to git.
erp_jmi@la:~/frappe-bench/apps/erpnext$ git fetch upstream
erp_jmi@la:~/frappe-bench/apps/erpnext$ git checkout master
error: pathspec 'master' did not match any file(s) known to git.
erp_jmi@la:~/frappe-bench/apps/erpnext$ cd -

Then, pretty much everything ended on the very next command when it could not find a missing module. Here is the trace for that part:

erp_jmi@la:~/frappe-bench$ bench update --requirements
INFO:bench.utils:./env/bin/pip install Pillow
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Requirement already satisfied: Pillow in ./env/lib/python2.7/site-packages (5.3.0)
Backing up sites...
/home/erp_jmi/frappe-bench/env/bin/python: No module named past.builtins
erp_jmi@la:~/frappe-bench$ bench --site all migrate
/home/erp_jmi/frappe-bench/env/bin/python: No module named past.builtins
erp_jmi@la:~/frappe-bench$ bench --site site1.local migrate
/home/erp_jmi/frappe-bench/env/bin/python: No module named past.builtins
erp_jmi@la:~/frappe-bench$

As you can see in this part of the trace, the module “past.builtins” is what it is looking for and nothing works after this point.

Just so you can see everything I did was by the directions (minus a typo or two that was corrected along the way) her is the entire trace of the session:

erp_jmi@la:~$ cd frappe-bench
erp_jmi@la:~/frappe-bench$ bench switch-to-branch v11.x.x frappe
remote: Enumerating objects: 191, done.
remote: Counting objects: 100% (191/191), done.
remote: Compressing objects: 100% (58/58), done.
remote: Total 207 (delta 147), reused 162 (delta 133), pack-reused 16
Receiving objects: 100% (207/207), 58.88 KiB | 14.72 MiB/s, done.
Resolving deltas: 100% (154/154), completed with 39 local objects.
From https://github.com/frappe/frappe
   4a66d5284..eafd8ab13  develop    -> upstream/develop
   1c92e37b6..1152b1fb5  hotfix     -> upstream/hotfix
   65b727ef6..513621a02  master     -> upstream/master
 * [new tag]             v11.1.37   -> v11.1.37
Branch v11.x.x does not exist in Upstream for frappe
Switched to v11.x.x
Please run `bench update --patch` to be safe from any differences in database schema
erp_jmi@la:~/frappe-bench$ bench switch-to-branch v11.x.x erpnext
Branch v11.x.x does not exist in Upstream for erpnext
Switched to v11.x.x
Please run `bench update --patch` to be safe from any differences in database schema
erp_jmi@la:~/frappe-bench$ bench update --patch
Backing up sites...
Patching sites...
Migrating site1.local
Updating DocTypes for frappe        : [========================================]
Updating DocTypes for erpnext       : [========================================]
INFO:bench.utils:sudo supervisorctl restart frappe-bench-workers: frappe-bench-web:
frappe-bench-workers:frappe-bench-frappe-schedule: stopped
frappe-bench-workers:frappe-bench-frappe-long-worker-0: stopped
frappe-bench-workers:frappe-bench-frappe-short-worker-0: stopped
frappe-bench-workers:frappe-bench-frappe-default-worker-0: stopped
frappe-bench-web:frappe-bench-node-socketio: stopped
frappe-bench-web:frappe-bench-frappe-web: stopped
frappe-bench-workers:frappe-bench-frappe-schedule: started
frappe-bench-workers:frappe-bench-frappe-default-worker-0: started
frappe-bench-workers:frappe-bench-frappe-long-worker-0: started
frappe-bench-workers:frappe-bench-frappe-short-worker-0: started
frappe-bench-web:frappe-bench-frappe-web: started
frappe-bench-web:frappe-bench-node-socketio: started
________________________________________________________________________________
Bench: Deployment tool for Frappe and ERPNext (https://erpnext.org).
Open source depends on your contributions, so please contribute bug reports, patches, fixes or cash and be a part of the community
()
erp_jmi@la:~/frappe-bench$ cd apps/erpnext
erp_jmi@la:~/frappe-bench/apps/erpnext$ git config --unset-all remote.upstream.fecth
erp_jmi@la:~/frappe-bench/apps/erpnext$ git config --add remote.upstream.fecth '+refs/heads/:refs/remotes/upstream'
erp_jmi@la:~/frappe-bench/apps/erpnext$ cd .../...
-bash: cd: .../...: No such file or directory
erp_jmi@la:~/frappe-bench/apps/erpnext$ cd ..
erp_jmi@la:~/frappe-bench/apps$ cd ..
erp_jmi@la:~/frappe-bench$ bench update --patch
Backing up sites...
Patching sites...
Migrating site1.local
Updating DocTypes for frappe        : [========================================]
Updating DocTypes for erpnext       : [========================================]
INFO:bench.utils:sudo supervisorctl restart frappe-bench-workers: frappe-bench-web:
frappe-bench-workers:frappe-bench-frappe-schedule: stopped
frappe-bench-workers:frappe-bench-frappe-default-worker-0: stopped
frappe-bench-workers:frappe-bench-frappe-long-worker-0: stopped
frappe-bench-workers:frappe-bench-frappe-short-worker-0: stopped
frappe-bench-web:frappe-bench-node-socketio: stopped
frappe-bench-web:frappe-bench-frappe-web: stopped
frappe-bench-workers:frappe-bench-frappe-schedule: started
frappe-bench-workers:frappe-bench-frappe-default-worker-0: started
frappe-bench-workers:frappe-bench-frappe-long-worker-0: started
frappe-bench-workers:frappe-bench-frappe-short-worker-0: started
frappe-bench-web:frappe-bench-frappe-web: started
frappe-bench-web:frappe-bench-node-socketio: started
________________________________________________________________________________
Bench: Deployment tool for Frappe and ERPNext (https://erpnext.org).
Open source depends on your contributions, so please contribute bug reports, patches, fixes or cash and be a part of the community
()
erp_jmi@la:~/frappe-bench$ bench update --reset
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
Already up to date.
INFO:bench.utils:./env/bin/pip install Pillow
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Requirement already satisfied: Pillow in ./env/lib/python2.7/site-packages (5.3.0)
Backing up sites...
INFO:bench.app:pulling frappe
INFO:bench.utils:git fetch --all
Fetching upstream
INFO:bench.utils:git reset --hard upstream/v10.x.x
HEAD is now at 5cd5417ac fix(build): Add 'app' argument to 'bench build' (#7615)
INFO:bench.utils:find . -name "*.pyc" -delete
INFO:bench.app:pulling erpnext
INFO:bench.utils:git fetch --all
Fetching upstream
INFO:bench.utils:git reset --hard upstream/v10.x.x
HEAD is now at 30be118 fix(error-report): Do not send error reports to support@erpnext.com (#17864)
INFO:bench.utils:find . -name "*.pyc" -delete
Updating Python libraries...
INFO:bench.utils:./env/bin/pip install --upgrade pip
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages (19.1.1)
INFO:bench.utils:./env/bin/pip install -q -r /home/erp_jmi/.bench/requirements.txt
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
INFO:bench.app:installing frappe
INFO:bench.utils:./env/bin/pip install -q  -e ./apps/frappe
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
INFO:bench.app:installing erpnext
INFO:bench.utils:./env/bin/pip install -q  -e ./apps/erpnext
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Updating node packages...
INFO:bench.utils:npm install
npm WARN frappe@ No description
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

audited 3555 packages in 8.628s
found 1 low severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details
Patching sites...
Migrating site1.local
Updating DocTypes for frappe        : [========================================]
Updating DocTypes for erpnext       : [========================================]
INFO:bench.utils:bench build
Wrote css/frappe-web.css - 65.11 KB
Wrote js/frappe-web.min.js - 132.77 KB
Wrote js/control.min.js - 77.1 KB
Wrote js/dialog.min.js - 117.07 KB
Wrote css/desk.min.css - 309.05 KB
Wrote css/frappe-rtl.css - 32.49 KB
Wrote js/libs.min.js - 1.13 MB
Wrote js/desk.min.js - 460.05 KB
Wrote css/module.min.css - 2.08 KB
Wrote css/form.min.css - 4.47 KB
Wrote js/form.min.js - 196.97 KB
Wrote css/list.min.css - 13.36 KB
Wrote js/list.min.js - 154.92 KB
Wrote css/report.min.css - 7.89 KB
Wrote js/report.min.js - 260.58 KB
Wrote js/web_form.min.js - 247.55 KB
Wrote css/web_form.css - 24.42 KB
Wrote js/print_format_v3.min.js - 23.39 KB
Wrote css/erpnext.css - 8.1 KB
Wrote js/erpnext-web.min.js - 3.8 KB
Wrote js/erpnext.min.js - 162.18 KB
Wrote js/item-dashboard.min.js - 8.13 KB
INFO:bench.utils:sudo supervisorctl restart frappe-bench-workers: frappe-bench-web:
frappe-bench-workers:frappe-bench-frappe-schedule: stopped
frappe-bench-workers:frappe-bench-frappe-long-worker-0: stopped
frappe-bench-workers:frappe-bench-frappe-default-worker-0: stopped
frappe-bench-workers:frappe-bench-frappe-short-worker-0: stopped
frappe-bench-web:frappe-bench-node-socketio: stopped
frappe-bench-web:frappe-bench-frappe-web: stopped
frappe-bench-workers:frappe-bench-frappe-schedule: started
frappe-bench-workers:frappe-bench-frappe-default-worker-0: started
frappe-bench-workers:frappe-bench-frappe-long-worker-0: started
frappe-bench-workers:frappe-bench-frappe-short-worker-0: started
frappe-bench-web:frappe-bench-frappe-web: started
frappe-bench-web:frappe-bench-node-socketio: started
________________________________________________________________________________
Bench: Deployment tool for Frappe and ERPNext (https://erpnext.org).
Open source depends on your contributions, so please contribute bug reports, patches, fixes or cash and be a part of the community
()
erp_jmi@la:~/frappe-bench$ bench update requirements
Usage: bench update [OPTIONS]
Try "bench update --help" for help.

Error: Got unexpected extra argument (requirements)
erp_jmi@la:~/frappe-bench$ bench setup requirements
Updating Python libraries...
INFO:bench.utils:./env/bin/pip install --upgrade pip
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages (19.1.1)
INFO:bench.utils:./env/bin/pip install -q -r /home/erp_jmi/.bench/requirements.txt
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
INFO:bench.app:installing frappe
INFO:bench.utils:./env/bin/pip install -q  -e ./apps/frappe
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
INFO:bench.app:installing erpnext
INFO:bench.utils:./env/bin/pip install -q  -e ./apps/erpnext
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Updating node packages...
INFO:bench.utils:npm install
npm WARN frappe@ No description
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

audited 3555 packages in 7.098s
found 1 low severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details


   ╭───────────────────────────────────────────────────────────────╮
   │                                                               │
   │       New minor version of npm available! 6.4.1 → 6.9.0       │
   │   Changelog: https://github.com/npm/cli/releases/tag/v6.9.0   │
   │               Run npm install -g npm to update!               │
   │                                                               │
   ╰───────────────────────────────────────────────────────────────╯

erp_jmi@la:~/frappe-bench$ cd apps/frappe && git fetch upstream && git checkout master && cd -
Branch 'master' set up to track remote branch 'master' from 'upstream'.
Switched to a new branch 'master'
/home/erp_jmi/frappe-bench
erp_jmi@la:~/frappe-bench$ cd apps/erpnext && git fetch upstream && git checkout master && cd -
error: pathspec 'master' did not match any file(s) known to git.
erp_jmi@la:~/frappe-bench/apps/erpnext$ git fetch upstream
erp_jmi@la:~/frappe-bench/apps/erpnext$ git checkout master
error: pathspec 'master' did not match any file(s) known to git.
erp_jmi@la:~/frappe-bench/apps/erpnext$ cd -
/home/erp_jmi/frappe-bench
erp_jmi@la:~/frappe-bench$ bench update --requirements
INFO:bench.utils:./env/bin/pip install Pillow
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Requirement already satisfied: Pillow in ./env/lib/python2.7/site-packages (5.3.0)
Backing up sites...
/home/erp_jmi/frappe-bench/env/bin/python: No module named past.builtins
erp_jmi@la:~/frappe-bench$ bench --site all migrate
/home/erp_jmi/frappe-bench/env/bin/python: No module named past.builtins
erp_jmi@la:~/frappe-bench$ bench --site site1.local migrate
/home/erp_jmi/frappe-bench/env/bin/python: No module named past.builtins
erp_jmi@la:~/frappe-bench$

At this point I am not sure if this can be recovered. I am going to exit the ssh session and leave it alone as it is for now. If anyone has any ideas about how to get past this point I am willing to reopen the session and give it a try.

BKM

@kolate_sambhaji solid method, me, I’m ‘terrified’ of updates even after so many years :rofl:. I tried this and put the steps up a while ago, I succeeded with it several times : Alternate Strategy to Update ERPNext to current ~v11

This above; actually takes a different path from a standard update/upgrade, well spoiler; as at today it appears to be failing, but I’m going to run it again. I cannot trust my current internet connection so, I cannot say it doesn’t work, so @bkm if this is worth your while; you may want to try this route. One thing I noticed is there were major changes sometime after I posted this; example, the item table doesn’t hold the barcodes, rather they’re in another table, so one import I made some while ago; items had no barcodes, shocker! Sometimes I wonder why that barcode wasn’t left and the table just added with the alternate barcodes, primary and alternates.

If you’re comfortable with thereafter inserting the records then you may give it a shot.

I doubt you can get 100% assurance of something that will work but you may need to try a mix of methods… I think.

Sometimes when you force and manipulate things, it may finally work but you may have some issues. Recently I had one and that will simply not bring up items to POS, I smelt a rat earlier because I had to ‘patch’ a lot of funny behaviors.

Ok, so @trentmu method met with errors at the half way point. So I will strip the server clean and start over with another fresh v10 install and then try the @kolate_sambhaji method. I don’t particularly like it, but if it works it is at least a path to an upgraded system. I just hate having to then go back and kill off the first site after the upgrade. It seems there should be a better way.

However, I need to get this figured out. So, I will try this:

It will take quite a while to get the server ready, but I will report back later tonight.

BKM

Ok, I finally got a path to updating from v10 to v11.

Thank you to @kolate_sambhaji for the clues. While I may have preferred a direct update method, his method is the ONLY thing that has worked so far. :grin:

Here is his brief set of instructions again:

To be fair to those that are new to ERPNext, the short list of steps above are not a real representation of the actual work that will be required.

There really is more to consider, such as:

  • maybe you need to get this done on your current server in order to keep the same ip address
  • maybe you have multiple tenants on a multi-tenant server that all need to be updated to v11
  • maybe you fear losing everything on the live server

To get past these issues, the best bet is to create a new server to do all of this updating work. If it works the way you expect, then you can always move your DNS pointers to the new site when you are satisfied that it works correctly as a v11 site.

If your current live serve is only supporting one site, then after this update process, you could even take the opportunity to completely strip the original server down and reinstall a fresh operating system. Then you would install the default v11 with the easy install method and just restore your updated database and files form the temporary update site. This would give you a fresh v11 server back on the old ip address with all of your data.

If you run a multi-tenant servrer as your current live server, then by performing the update process for each tenant one at a time, you have the ability to move your sites as you have time without having to rush them all at once. Just move the DNS pointers for each site to the new server location as each one is completed.

Regardless of how you approach the update, as long as you create a separate server to do the work, you will not have to worry about accidentally destroying your working live sites.

So, in an effort to document this process as best as I can, I will detail the steps you need to do for each site here:

1.) Create a fresh and updated server (I used Ubuntu 18.04 LTS)

2.) Use the instructions for the “Easy Install” to install default latest v11

3.) Login to the new v11 as Administrator and complete the setup wizard to create a dummy site.

4.) After setup wizard is done, logout and close the browser.

5.) Open a ssh session to the server using your default user account

6.) run the following commands:

cd frappe-bench/sites
nano currentsite.txt  (delete the site1.local entry and save the file as empty)
cd ..   (this takes you back to frappe-bench)
bench config dns_multitenant on
bench new-site [your.site.name]  (enter the actual URL for site you want to update)
bench setup nginx
sudo service nginx restart
bench --site [your.site.name] install-app erpnext

7.) At this point you need to open a new browser and login to the new site as Administrator and complete the setup wizard again.

8.) Once you have completed the setup wizard for the site that will become your updated installation, logout and close the browser again.

9.) Copy the latest backup of your live site to your new server (it will be restored to the update site later)

10.) Use scp to move all of the files in the /public/files and /private/files directories from your live site to the same locations on the new server in the update site.

11.) Use the following command to restore the live backup to your update site:

sudo bench --force --site [your.site.name] restore /path/to/your/backup.sql

12.) In the ssh session for your update site, run the following commands:

bench --site [your.site.name] migrate
cd sites/[your.site.name]
nano site_config.json  (use the "encryption_key" line from live server to replace this one)
cd ~/frappe-bench   
bench setup nginx
sudo service nginx restart

13.) At this point you should open a fresh browser and log into the update site to test your migration to v11.

The above set of instructions is not detailed like my tutorials, but it is pretty complete and based on my experience doing this on an Ubuntu 18.04 LTS server.

Hopefully this has been helpful to someone else that is dreading the upgrade process.

Is it perfect? Probably not, but it is repeatable.

As always… Your mileage may vary! :sunglasses:

BKM

5 Likes

@bkm @kolate_sambhaji Thanks you for your revelations and effort. Even though I have not tried it, I know it works. Thanks to all other friends who have contributed. To our amiable Team, kindly help to re-factor the easy upgrade method (bench update) that has been ever working for all upgrade before version 11.

As usual, @bkm to the rescue! :wink: But you can skip steps 6 and 7 if you have a single tenant and you’re restoring to a clean server. Using the easy install script, if you add the --site [your.site.name] tag and ensure you use the url for the live server, you don’t need to delete the default site and create a new one, as the site created during the install process will be exactly the one you need and all you need do after the initial setup wizard is to restore your backup and bench migrate.

In some cases you may need to run bench update --patch after migrating to ensure that all the tables are migrated and patched properly (i have encountered a case where migrating didn’t reconcile all doctype changes in V11 and running bench update --patch eventually fixed it).

1 Like

@bkm @noetico
I have given method to install ERPNext v11 on complete new server and then restore backup of site just to keep live site safe.

If we install ERP on new server then there is 100% chances of ERPNext working fine for fresh site.
After doing bench migrate some patches might be fails, but we can skip it or fix it.

Instead of new server you can also install fresh erpnext on Test Server or local machine using multi bench setup

https://github.com/frappe/bench/wiki/Multi-Bench-Setup

Once your second bench instance setup done, you can simply copy old bench site folder to new bench site folder and run bench migrate command.