Knowledgebase

Question About Servers

How to Update your Odoo Instance in Ubuntu Print

  • 0

This article outlines how to update your Odoo instance to the latest code. This type of update helps to update your code base with the latest upgrades, bug fixes, and new features/functionality. Please note that this update will not change the version of Odoo that you are currently running.

Step 1: Connect to your server via SSH

If you are unsure about how to connect to your server via SSH, see this article. Once you connect, you will be able to execute any commands in your server's terminal.

Step 2: Switch to the Odoo user

When performing Odoo operations, it is advisable not to run commands as root. Use this command to switch to the odoo system user.

su odoo

Step 3: Navigate to your Odoo directory

Navigate to the folder that contains the "odoo-bin" file. Use the command below, however, be sure to use your correct path.

cd /opt/odoo/odoo13

When you are in the correct directory and you list the files using the ls command, you will see a list of files similar to the image below.

odoo-update-list-directory.png

Step 4: Fetch the up-to-date files from Github

Use the following command to fetch the updated files from Github.

sudo git fetch origin 13.0

Please be careful to get the correct version of Odoo that is running. In the above case, this command will fetch the updated files for Odoo 13.

Step 5: Apply the changes

Use the git reset command as shown below to apply the changes that have been fetched. 

sudo git reset --hard origin/13.0

 Please be sure to get the correct Odoo version. This command will work for version 13.

Step 6: Update the Database

Once the changes have been applied to the code base, you need to apply all the necessary database changes as well. This can be achieved using the following command. 

sudo service yourOdooService restart -u all -d YourDatabaseName

Please be sure to replace "yourOdooService" with the correct name of your odoo service and the "YourDatabaseName" with the correct name of your database. The odoo service will be restarted with the updated database.

Congratulations! You have successfully updated your Odoo instance.


Was this answer helpful?

« Back

Enterprise-Grade Hardware

  • Samsung
  • Juniper
  • Western Digital
  • Supermicro
  • LSI
  • Intel
  • R1Soft Backups
  • cPanel
  • MySQL
  • Parallels
  • HP Partner