Join the Odoo Inner Circle to view the premium video below.
Learn to Migrate, Upgrade and Repair Odoo Databases

Learn to Migrate, Upgrade and Repair Odoo Databases

45.00 45.0 USD

45.00

Free with Odoo Inner Circle Add to Cart

Do you receive an "Internal 500 Server Error" when starting Odoo? Migrate and repair Odoo databases. Learn to fix your Odoo database to solve Internal 500 Errors or troubleshoot the database of other problems that can keep Odoo from successfully launching.

Video Length:   2:50 hrs
Free With Odoo Inner Circle

Migrate Odoo Databases from one Odoo version to another

In this advanced video that is nearly three hours long, you get to see the step by step process of migrating and repairing a database that has been moved from one Odoo build to the latest Odoo master branch. Like many of the recent videos, this video looks at a real business requirement as Odoo Class is prepared for upgrading from Odoo 8 to Odoo 9 master branch. Plus, if you are an Odoo developer, you will break an Odoo database at some point. For advanced developers this video will help you isolate those hard to find problems.

Repair an Odoo database broken by a new build or database inconsitency

While this video looks at a full migration of an Odoo database that requires rather extensive repair to become functional, the troubleshooting and advanced Odoo skills required can help you repair Odoo databases that are failing for a variety of reasons. Sometimes this is database integrity, constraint problems, or missing fields that will keep your database from starting up in Odoo. 

Important skills for Odoo integrators and developers

If you work with Odoo for any length of time it is inevitable you will get the dreaded "Internal Server Error 500". At this point your ability to troubleshoot your Odoo installation and database is critical. Even restoring the database from a backup, you may find that something within Odoo's internal code base is no longer compatible or there are other issues that must be resolved. In this video you will see first hand how to tackle a variety of database consitency issues and aquire the troubleshooting skills required to fix and repair Odoo databases.

How do I move my Odoo database to the lastest build? Can I convert from version 8 to version 9?

As you will see in this video, moving a database from one build of Odoo to another build of Odoo is not a task for beginners. This is an advanced concept for developers and integrators that are faced with the need to move Odoo databases between builds for a variety of reasons. This is particulalry a valuable video for those who are working off the master branch and must cope with more volatility within the code base. 

Recovering from Odoo Internal Server 500 errors

Often after doing a git pull or updating to the latest codebase an Odoo integtrator will get hit with a server error when launching the Odoo server. Many people working with Odoo can then feel somewhat stuck with going to a backup and sticking with older Odoo code bases. When the code gets updated, the database breaks. This video is for advanced users that wish to attempt to fix and repair Odoo databases. Be warned... this is a very advanced topic and the process of fixing and repairing Odoo databaes can be tedious. Still, even in production environments it's quite possible community addon modules or other custom modifications will break or be incompatible with a given Odoo database. This video gives you the foundation you need to handle a variety of Odoo database problems.

What is the difference between repairing or recovering an Odoo database and upgrading an Odoo database?

The primary difference between these two activities is that in one case you are intentionally moving an Odoo database from one version of Odoo to another. In this example we are taking a database that is running on a version of Odoo that is many months old and upgrading it to the latest master build. This process breaks the database and requires multiple steps in order to remove the critical errors out of the database.

When you are repairing or recovering an Odoo database from the outset, typically it is uplanned. Perhaps a custom modification has made it impossible for Odoo to launch the server? Maybe a git pull from the latest source is conflicting with a community module or was unable to properly configure your database for the new source. While this is most often a problem when upgrading Odoo from the master branch, it is possible it can happen for a variety of reasons. Another common example is database relational integrity. 

What are some of the skills I need to get value from this video?

This is an advanced Odoo topic. The associated videos listed at the bottom of this page are considered pre-requisites. Specifically it helps to understand Odoo's database architecture, the development cycle, and Odoo's overall framework. 

Working through the database and finding out what is breaking

When repairing an Odoo database you will often find yourself confronted with Internal Server 500 errors when you attempt to access the Odoo instance. This very generic error gives you no information. While the video goes into the details of all the specific troubleshooting techniques, here are some of the techniques that can help you fix Odoo databases:

1. Run Odoo from the command prompt and watch the log

If you are used to just stop and starting the Odoo service and then going to look at the log this can slow your cycle. Instead, launch Odoo from the command line and get immediate feedback on the errors that are causing Odoo to fail to startup.

2. Plan to make many changes using SQL commands

Expect to use a tool like PG Admin 3 or get very comfortable with psql so that you can quickly modify the database structure, make changes to records, and do queries to get a good look at the data. The better you are at finding and fixing data and structure of the database, the faster you will fix your problem.
* Learn how to identify what needs to get fixed in an Odoo database to recover or get it working again... get familiar with the SQL queries to find and fix the problem.
3. Put print and debug statements in to help you find out what is going on in the code
As you will see in the video, you often need to know more information than just that an error occured. This is where you must add some statements to print out critical information that can help you determine what Odoo is expecting. Repairing a database often means that fields have been re-purposed or perhaps fields that were previously optional are now required. 

4. When upgrading from one version of Odoo to another, or from master branches... the longer time between the builds, the more you will have to fix.

In this video you get to see first hand a migration by an Odoo expert taking Odoo Class from master branches in September 2014 build into a May 2015 master Odoo 9 build... There are very few Odoo developers with the skill Diogo shows in this video at tracking down and fixing an Odoo database. If this system also contained manufacturing, accounting & finance, purchasing, and other more ERP related applications the time required to upgrade the database would be even greater. Therefore, one strategy you can persue is to upgrade your database to builds that are closer to your existing database allowing you to do the upgrade in smaller pieces.

5. Eliminate applications and data you don't require in your upgrade

Consider when upgrading that each application and dataset you move over into new versions of Odoo has the potential to break part of the database. Therefore, if for example you have applications that can be added back in later after the upgrade, that can shave off time for your upgrade. 

6. Test every process backwards and forwards. Make sure you test them again when you enable/disable any new options. Test Extensively.

Upgrading a database into a new version of Odoo has additional risks and complexities that you must consider. Even with extensive testing you may find that when you add a new application or turn on a particular feature, you expose a new bug that must be fixed. Don't just assume that because you have a working database that it is completely fixed. It is very easy to miss problems with a database that has been upgraded from a previous version of Odoo.

7. Consider importing data using XML-RPC into a fresh Odoo installation.

Depending on your specific requirements it maybe easier to import data from an older Odoo database version into a new Odoo installation rather than attempting to upgrade an older Odoo database to be compatible with the latest Odoo build. 

8. Learn the skills required to fix an Odoo database before you need them for an important recovery

This video has great value for anyone who intends to install & manage Odoo systems because regardless of your practices, it is very possible that because of custom applications or even a new build within an existing Odoo stable release will break an Odoo database. Knowing how to fix these problems can be invaluable to getting a system back up and running fast. Sure you can go to a backup of a database... but often even with good backup systems this can cost a business a full day of work. If however you wait until you have a problem and then have to start learning the process of fixing a database you will likely save time just going to the backup... the learning curve is just too long to do this operation under pressure. However, knowing how to troubleshoot these Internal Server 500 errors, find relational integrity problems in your Odoo database, or fix data that is causing critical errors can be invaluable and can save countless hours of worker time.

9. For production environments, stick with stable releases and use Odoo Enterprise Services to upgrade your database when possible

Once you get several builds out the difficultly in migrating from one Odoo version to another becomes increasingly complex. If you are on a stable Odoo build and continue to patch that build it is likely with the skills you can learn from this video you can fix most any Odoo database error. If you are lucky you will never need to get in and fix a Odoo database, but in practice it is often fix the database or go to a backup. Your best defense in production environments is to always stick with stable releases... don't go for the master branch as that will have much greater volatility. This video was in fact designed to demonstrate what it really takes to handle volatility within the master branch and move a database between one version of Odoo and another. In practice, it is most likely even with this video we will create a new Odoo database from scratch and import the required data and move over the website using the tool demonstrated in the previous video. Consider this video as a learning tool in handling serious database consistency problems and a resource when you get stuck finding problems within your Odoo database. 

10. Always have a solid business continuity plan in place

Despite all you can do to repair a database it is critical that you always have a plan in place to guarantee business continuity. Don't just make backups of your databases. Test those backups along with the exact backup of the Odoo build you would revert to. You should test your Odoo recovery plan immediately following any deployment or major upgrade as well as at periodic intervals. If you have gone longer than six months without testing your backup systems by doing a full test recovery for business continutity... then you have gone too long. Don't just assume you can pull what you need from a backup to get back up and going. It takes too long to configure servers, databases, connections, and get everything tested out to leave it up to chance.