How to Test Project with Newer ERPNext/Frappe Versions Without Losing Existing Data?

Hi everyone,

I’m working on a project within a system that currently uses older versions of ERPNext, Frappe, and some other modules. For development and testing purposes, I need to test the same project with the newer versions of these apps.

However, I’m facing a problem:
If I uninstall the current (older) versions and install the newer ones, it may cause data loss or compatibility issues.

Is there a recommended way to test my project with the newer versions without affecting my existing system and data?

Any suggestions or best practices would be greatly appreciated.

Thanks in advance!

You should have multiple servers or at least multiple benches.

Copy your site’s directory to test server/bench.
On the test server install all apps of the versions you’d like to test (any apps installed on your site will need to be installed on the test server).

Restore your site (you can edit the site_config.json in advance, changing site name and/or DB name, rename site directory to match new site name, then perform the restore)

Run bench —site {your.site} migrate

This will give you a test environment with your data and any customization you’ve done in the DB.