How to update the erp to latest version?

hi frds,
Now i am using erpv4.In this erpv4 i am create a so much of report and customized doctype.But now i want to update to the latest version .How ll i do that ?what are step to follow…?i want to Update all the doctype ,report and database are restore and i like to use my erp in latest version
Thanks

Hi,
Use ‘bench update’ command to update your erp version.
steps:-
1.On terminal
2. go to path where your setup installed.
for example- cd Documents/frappe6/frappe-bench
means your path where setup is installed/frappe-bench

3.then activate environment for that use command ‘source …/bin/activate’
4. then enter ’ bench update’ command.

ikhlas1@ikhlas1:~/bench$ source …/bin/activate
bash: …/bin/activate: No such file or directory

ikhlas1@ikhlas1:~/bench$ bench update
You asked me to pull without telling me which branch you
want to merge with, and ‘branch.v0.93.merge’ in
your configuration file does not tell me, either. Please
specify which branch you want to use on the command line and
try again (e.g. ‘git pull ’).
See git-pull(1) for details.

If you often merge with the same branch, you may want to
use something like the following in your configuration file:
[branch “v0.93”]
remote =
merge =

[remote "<nickname>"]
url = <url>
fetch = <refspec>

See git-config(1) for details.
Error: None
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==0.92’, ‘console_scripts’, ‘bench’)()
File “/home/ikhlas1/bench-repo/bench/cli.py”, line 56, in cli
bench()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/ikhlas1/bench-repo/bench/cli.py”, line 210, in update
update_bench()
File “/home/ikhlas1/bench-repo/bench/utils.py”, line 188, in update_bench
exec_cmd(“git pull”, cwd=cwd)
File “/home/ikhlas1/bench-repo/bench/utils.py”, line 80, 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 pull’ returned non-zero exit status 1
ikhlas1@ikhlas1:~/bench$

What do you mean by latest version? The latest 4.x or the current 6.x version?

Good question.

Also before attempting any update:
1: from your V4 frappe/frappe-bench/ folder run
bench export-fixtures
bench migrate
2: Export a back up of your V4 DB
3: Now from your V4 frappe/frappe-bench/ folder run
bench update

I guess that would update the existing V4 to it’s latest (V4) version, right?

If you wanted to upgrade to the new major version after doing all preps described by @System19 would be followed by a bench update --upgrade I think (again from inside the frappe/frappe-bench/ folder). Isn’t that so?

What I wonder … once you are in V4 does a bench update --upgrade result into a V5 or the newest that is out there?

Hmmm probably not… Just try it see the result :joy:

ikhlas1@ikhlas1:~/bench$ bench export-fixtures
Usage: bench [OPTIONS] COMMAND [ARGS]…

Error: No such command “export-fixtures”.
ikhlas1@ikhlas1:~/bench$

cd /your-server-user-name/frappe-bench/
then run
bench export-fixtures
and all other bench commands for that matter.
To check to see if you are in the right folder run
bench --help
If you get an error like above you are not in the right folder.

migrate-3to4 Migrate from ERPNext v3.x
new-app start a new app
new-site Create a new site in the bench
patch
prime-wheel-cache Update wheel cache
release Release app (internal to the Frappe team)
restart Restart supervisor processes
retry-upgrade
set-default-site Set default site for bench
set-mariadb-host Set MariaDB host for bench
set-nginx-port Set nginx port for site
set-ssl-certificate Set ssl certificate path for site
set-ssl-key Set ssl certificate private key path for site
set-url-root Set url root for site
setup Setup bench
shell
start Start Frappe development processes
switch-to-develop Switch frappe and erpnext to develop branch
switch-to-master Switch frappe and erpnext to master branch
switch-to-v4 Switch frappe and erpnext to v4 branch
update Update bench

ikhlas1@ikhlas1:~/bench$

bench --help…I am in right folder

No your not.
Try logging into your server with the username frappe and not ikhlas1.
frappe@ikhlas1: cd ~/frappe-bench/
then run bench --help again and you should get more bench commands.

Ok just re read your post
login as usual then cd ~/frappe-bench/ then bench --help or bench export-fixtures
Most ERPNext installs are created in the frappe user account.
Not the root or admin account.

ikhlas1@ikhlas1:~/frappe-bench$ bench --help
Usage: [OPTIONS] COMMAND [ARGS]…

Bench manager for Frappe

Options:
–help Show this message and exit.

Commands:
backup backup site
backup-all-sites backup all sites
config change bench configuration
download-translations Download latest translations
get-app clone an app from the internet and set it up…
init Create a new bench
migrate-3to4 Migrate from ERPNext v3.x
new-app start a new app
new-site Create a new site in the bench
patch
prime-wheel-cache Update wheel cache
release Release app (internal to the Frappe team)
restart Restart supervisor processes
retry-upgrade
set-default-site Set default site for bench
set-mariadb-host Set MariaDB host for bench
set-nginx-port Set nginx port for site
set-ssl-certificate Set ssl certificate path for site
set-ssl-key Set ssl certificate private key path for site
set-url-root Set url root for site
setup Setup bench
shell
start Start Frappe development processes
switch-to-develop Switch frappe and erpnext to develop branch
switch-to-master Switch frappe and erpnext to master branch
switch-to-v4 Switch frappe and erpnext to v4 branch
update Update bench

ikhlas1@ikhlas1:~/frappe-bench$

Sorry I am a bit lost as to how your dev setup your instance of ERPNext.
Also I don’t have a copy of ERPNext version4 to check against.
Can you run cd /home/ the run ls
You should normally see one folder (in your case called ikhlas1) and another folder called frappe. Can you confirm this is the case please.

I am have only one folder ikhlas1 and no other folder is there called frappe…!

Ok thanks. Where is your copy of ERPNext installed?
On a local computer or on a web server?

on web server

Where about? Digital Ocean, Go Daddy etc etc

And who set this up for you?

Sorry on my local machine only i am have a problem…In web server its has no prroblem…