Testet an working update v. 7 to v. 9

Erpnext v7.2.27 / Frappe v7.2.27
Updates to
Erpnext v9.2.23 / Frappe v9.2.24

1.:

Backup your site/sites

Backup database.:

~/frappe-bench$ bench backup
or
~/frappe-bench$ bench backup-all-sites

Backup database with files.:

~/frappe-bench$ bench --site [sitename] backup --with-files

your database backups will be in

~/frappe-bench/sites/[sitename]/private/backups/
or
setup β†’ download backups β†’ your backup version

2.:

Make a new/clean install https://github.com/frappe/bench

apt-get update
apt-get dist-update

apt-get install python-minimal
apt-get install build-essential python-setuptools
(iΒ΄m using a clean ubuntu 16.04 vm and also needed this to use the easy install script without errors)
apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev

wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py

Install for developer/production

sudo python install.py --develop
or
sudo python install.py --production

If your logged in as root (sudo-i)

python install.py --develop --user frappe
or
python install.py --production --user frappe

3.:

If you not using default site name (site1.local) create you own

~/frappe-bench$ bench new-site [sitename]
~/frappe-bench$ bench --site [sitename] install-app erpnext

~/frappe-bench$ bench set-nginx-port [sitename] 80
~/frappe-bench$ bench setup nginx
~/frappe-bench$ sudo service nginx reload
~/frappe-bench$ bench use [sitename]

(reference to https://github.com/frappe/bench/wiki/Multitenant-Setup)

4.:

Move you files through ftp or wget

(wget) https://github.com/frappe/erpnext/wiki/Restoring-From-ERPNext-Backup

~/frappe-bench$ bench --site [sitename] --force restore /path/to/SQLFILE

Many changes and hotfixes have been made from version 7 to 9.

therefore go to the database and make a few changes

~/frappe-bench$ bench mysql
MariaDB [databasename]> ALTER TABLE tabDocType DROP COLUMN track_seen;
MariaDB [databasename]> ALTER TABLE tabDocType DROP COLUMN quick_entry;
MariaDB [databasename]> ALTER TABLE tabDocType DROP COLUMN image_view;
MariaDB [databasename]> ALTER TABLE tabDocType DROP COLUMN beta;
MariaDB [databasename]> ALTER TABLE tabDocPerm DROP COLUMN is_custom;
MariaDB [databasename]> exit

When updating/migrating there might be a few stops but run it again at it will complete

~/frappe-bench$ bench update --patch
~/frappe-bench$ bench --site [sitename] migrate
~/frappe-bench$ bench update

That it worked for me… have fun.

1 Like