"Session Start Failed" after Restore

I am running VM instances on GCP because they are easy to install quickly. After importing all of the data I need on the system, I ran a backup on the instance before testing some erpnext features and functions. After some days of testing I realized I had made mistakes and wanted to start over so I created a fresh ERPnext instance with a new install on GCP using these steps:

NOTE: I did NOT login to the fresh system with the Administrator to do an initial startup. I just began the restore process immediately.

Once the fresh erpnext system was installed I restored the backup from the beginning of the last instance with all of the imported data already done. Please note that when following the Step by Step instructions linked above on GCP, erpnext is installed in the /home/frappe folder and no login credentials are available for the frappe user. So, in some places I have to use “sudo” to run commands because frappe is not installed in the default debian users home folder (/home/erp_jmi), it exists in the frappe home folder instead.

The instruction I had to use to run restore was:

sudo bench --force --site site1.local restore /home/erp_jmi/20170809_125913_database.sql

It asked for my sql admin password, which I typed in and a few minutes later I got back my prompt so it appeared that all went well with the restore. I also restored all the files that were once in the frappe-bench/sites/site1.local/public/files folder as well.

I then used the command “sudo bench restart” to restart the bench after the database and files restore. When that was finished, I opened a fresh browser and typed in the ip address of my erpnext server.

I was presented with the normal login screen. I used one of the users credentials from the restored database to log into the system. It indicated that the login was successful, but it could not take me to the desk environment. Instead it posted the following error and nothing else worked:

Does anyone have any idea how to correct this?

Thanks - BKM

1 Like

@bkm

You need to do bench --site YOUR-SITE migrate after you restore

1 Like

Thank you. That did let me login to the system.

Does the “migrate” switch go out to the sources and bring everything up to current? It seemed like there was a lot going on when I use migrate.

BKM

Yes, It basically, ensures that the updates/changes are take effect and are in sync. Generally on my end this is all that takes place

Migrating site1.local
Updating DocTypes for frappe        : [========================================]
Updating DocTypes for erpnext       : [========================================]
Syncing help database...
1 Like

after migrate , it says: encryption key invalid

I am still stuck on this error of encryption key…

I have no explanation. I have never encountered this response before and I create new VM instances several times a week and restore my test database without ever having anything like this happen.

Hopefully someone else will have an answer. You might want to start a fresh topic explaining everything you did and the message that keeps getting in the way. You will have to detail what OS you are using and what platform you are running on as well as any special modifications you may have made to the system along the way. Maybe someone will be able to respond then.

BKM

1 Like

Thanks