Data Migration from erpnext 3 to erpnext 4

Hi,

Is there any other way to migrate data from erpnext 3 to erpnext 4 other than data import.

We have moved the installation from existing machine to new machine.

Regards, Senti

bench frappe --latest should migrate it if your database was patch to the last patch of version 3

But we have installed erpnext 4 in new machine. I hope, we cannot use bench command to move the db here. Can you kindly suggest here?

Have you restored the db dump yet? If yes, run the following
Start bench frappe --ipython and run

from frappe.modules.patch_handler import executed
last_v3_patch = 'patches.1401.fix_pos_outstanding'
print executed(last_v3_patch)

If this prints True, you can run the following to migrate to v5

bench frappe --add_to_installed_apps frappe
bench frappe --add_to_installed_apps erpnext
bench frappe --add_to_installed_apps shopping_cart
bench frappe --latest