Restore from Backup -skip Setup Wizard, Keep Customization , verify db records


After downloading .sql backup file from the source server

I did the below steps on target server

  1. Uploaded the sitename_backup.sql file to frappe-bench folder
  2. Created a new site ( with different name from the source, as i want to change the sitename/ URL )
  3. Installed ERPNext
  4. run bench --site sitename --force restore sitename_backup.sql
  5. bench --site sitename migrate
  6. When i login , i am redirected to the setup wizard.

My queries

  1. After executing step 5 and 6 , why am i being redirected to setup wizard, when there is already records restored in the database. I verified it through bench mysql command

  2. After running the setup wizard once again on the target server, i am not able to see the records on the instance, while i am able to see the records in the database back-end.

  3. I am able to see both types of records in the database back-end. The one run through setup wizard and the one restored form the database backup .sql file.

  4. I am able to see the customized columns ( fields) in the table in the database back-end , but i am not able to see the fields in the front-end form / customize form / in doctype .

Could someone please guide , where am i wrong ?

Basically ,

  1. i want to skip the setup wizard on target server site ,by doing force restore. how to achieve that ?
  2. want to see the records in the front-end instance , not just in the database on target server ?
  3. want to transfer the customized fields with data from source to target.

Worked for me as below

Steps on target server :

  1. Create a new site
  2. Install erpnext
  3. run setup wizard logout
  4. do bench force restore.
  5. bench site migrate
  6. bench site set admin password (optional)

Assumption :
Both frappe and erpnext versions should be exactly same in both servers.
target server should be ahead of source server.