ERP and CRM Dolibarr is a management system for companies and private or state bodies, it is one of the most powerful open source solutions on the market with several modules available free of charge to their users, and like all ERP , Dolibarr has a robust system that allows their users to update their Dolibarr once the sources of the new version are deployed online, in this case you have two methods to perform the update of dolibarr: Simple or automatic ...

Warning ! this type of update on business management systems is not always considered simple or easy to perform, it would require experts (IT specialists, developers or specialized companies) in Dolibarr's ERP in order to take precautions to avoid any loss of data or blockage on your Dolibarr tool which is used in your company.

I present to you a small example on the difficulty of updating Dolibarr, assuming that we have Dolibarr installed on a Y version in production and deployed on a classic web server, if you use xamp, Wamp or Mamp, or another Debian installation, it will be a little different on the three servers, as the sources are not installed in the same locations.

Dolibarr installation procedure:

Before installing the Dolibarr ERP, it is better to know the Dolibarr architecture which is made up of a database and 3 directories which are in turn grouped together under a dolibarr directory (below an example illustration ):

  • Htdocs folder: contains the sources of the management pages
  • Documents folder: contains all the documents generated by Dolibarr (pdf, images etc ...)
  • Scripts folder: contains all the scheduled tasks of Dolibarr.

The Dolibarr url link (dolibarr.votre-site.com) normally points to the htdocs directory and the latter which contains the Dolibarr ERP management system. The other documents and scripts directories must not be visible from a chrome or firefox browser (security access must be prohibited)

Note: YOU MUST ALWAYS BACK UP to avoid any problem with your data, make a backup copy of the 3 directories (mentioned above) and put the copy in a safe place. Back up the Dolibarr database (mysqldunp, phpmyadmin, or via the Dolibarr interface) and put that in a safe place too.

1st Step: Make a copy of your production Dolibarr:

  • create a directory named newolibarr (for example)
  • copy the Dolibarr directories there: htdocs and scripts from the old version
  • copy your documents directory from the old Dolibarr installation into the new "newolibarr" directory
  • create a second empty database named (newolibarr)
  • import the backup of your old dolibarr ERP into this new database.
  • carefully modify the htdocs / conf / conf.php file: the lines of the database, the url of your Dolibarr and the path to the documents directory.
  • create the url to access this new dolibarr (example: dolibarr.votre-site.com)
  • After this operation everything should work normally because the backup version is a carbon copy of the Production version.

So the Dolibarr version of Production will be used to do the migration and the old installation will continue to be used during this time by the users of your company or you unlock if you want to make a customer or supplier invoice ...

Now if you are ready to take off! we move on to the migration steps:

Step 2: Migration of Dolibarr:

We migrate to the new Dolibarr and the old version takes care of your day-to-day management.

Disable all external modules installed on your Dolibarr

keep the file htdocs / conf / conf.php

and then replace the htdocs and scripts directories of the new installation with the directories of the new version.

connect to the Dolibarr ERP and run the migration scripts.

That's it and Ok, you now have a new basic version of Dolibarr and your old data. Start to check if everything is working properly.

Step 3: install the new versions of the Dolibarr external modules:

you have updated Dolibarr, you must also install the new versions of the modules (you must contact the developers of the modules). Important, because a module purchased for your old version of Dolibarr will not work on the new version.

Download the .zip files of your new versions of Modules, then Activate each module so that it also executes its migration scripts.

Step 4: TEST MIGRATION

Verification step: Check that the functions you usually use in your Dolibarr are working correctly: create a contact, a third party, establish invoices, examine the documents, upload files to your ged dolibarr, etc ...

Test the new Dolibarr functions that you usually want to use,

Test the proper functioning of the plugins and if you have any problems, you should contact the developer of your plug-in.

Step 5: The production of Dolibarr!

  • First, save the Dolibarr database in production,
  • Stop all scheduled tasks, any imports on your production Dolibarr,
  • disable all external modules,
  • keep the htdocs / conf / conf.php file in a safe place ...
  • replace the htdocs and scripts with those of the new version you tested (including external modules)
  • retrieve the htdocs / conf / conf.php file of the old production version of your Dolibarr ERP
  • connect to your production Dolibarr and run the migration scripts (Attention! we are doing it again, but on the production data).
  • connect and re-activate the external modules again,
  • restart scheduled tasks
  • check again!

Congratulations, You have completed your Dolibarr migration!

IMPORTANT! If for some reason your Dolibarr migration failed, below are our tips: how to recover your old version:

  • delete the htdocs and scripts directories from the installation in prod,
  • put back your old sources, carefully saved in point 2,
  • delete all columns from the production database
  • restore the backup of the production database that you made just before going into production (step 5)

CONCLUSION:

The operation of migrating an open source system is never a small matter, if one wanted to keep a production system always up to date and in good working order. I see too many topics posted on Dolibarr forums regarding migration issues. Yet with a little method and concentration, it goes very well.

You want help with your migration, order our Dolibarr migration service!