ERPnext update version

Hi,

I have the ERPnext v4. Some days ago i tried to update using the below command

bench update

the system was automatically start upgrading to v5.

How i can update only the latest v4 updates?

Thanks

bench switch-to-v4

If the patches started running, don’t do this and upgrade to v5 completely.

Thank you.

I had snapshot when that happened, so i turn it back.

after i run bench switch-to-v4 i have to run bench update?

Hi
Can we run V4 and V5 portal on single machine.
Please guide us on this, As we start upgrade it will move to V5 directly.

Thanks in advance.

Anyone can help?

thanks

Yes, this is all you need to do

i tried but doesn’t work

Please check below

:~/frappe-bench$ bench switch-to-v4
Usage: bench [OPTIONS] COMMAND [ARGS]…

Error: No such command “switch-to-v4”.

Try after updating bench

cd ~/bench-repo
git pull
cd ~/frappe-bench
bench switch-to-v4
bench update

Thanks @pdvyas for your prompt response.

Please check below the error i get while i ran

bench switch-to-v4

Error: None
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==0.1’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/bench-repo/bench/cli.py”, line 56, in cli
bench()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 610, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 590, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 936, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 782, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 416, in invoke
return callback(*args, **kwargs)
File “/home/frappe/bench-repo/bench/cli.py”, line 315, in _switch_to_v4
switch_to_v4(upgrade=upgrade)
File “/home/frappe/bench-repo/bench/app.py”, line 177, in switch_to_v4
switch_branch(‘v4.x.x’, apps=apps, bench=bench, upgrade=upgrade)
File “/home/frappe/bench-repo/bench/app.py”, line 158, in switch_branch
exec_cmd(“git checkout {branch}”.format(branch=branch), cwd=app_dir)
File “/home/frappe/bench-repo/bench/utils.py”, line 79, in exec_cmd
subprocess.check_call(cmd, cwd=cwd, shell=True)
File “/usr/lib/python2.7/subprocess.py”, line 511, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘git checkout v4.x.x’ returned non-zero exit status 1

You’ve omitted the part of the output that describes the error