[Solved] Odoo Cannot log in error after the Database is Recovered

Many odoo users have encountered the problem that the backed up database cannot be restored

You can self-check in the following ways

1. Is the odoo version correct? Different versions of odoo cannot be restored directly, for example, odoo13 cannot be restored directly to odoo15

2. Whether the database version is correct, postgres may have problems when it is backward compatible. It is recommended to migrate to the same version.

3. Whether the code is migrated correctly, inconsistent codes on both sides will also cause an error, which is common in the conf file without specifying the code location.

If you confirm that the above content is correct, you can try the following methods

1. Add -d database name -i base when starting odoo through the command line, this method is to select the database to force the update of the base module; because all odoo modules are dependent on this, the mandatory update will be all the modules installed in the database after the base Will be upgraded.

2. Enter postgres, enter the following command

su postgres; # Switch postgres users
psql; # Enter the postgres command line
\c; database name # specify database instance
DELETE FROM ir_attachment WHERE url LIKE '/web/content/%'; # Delete the front-end files cached in the data table

Generally, most problems can be solved through the above two steps.

Read More: