Upgrade dolibarr 12.0.3 to 14.0.0 - Bitnami Cloud

Keywords: Dolibarr - Bitnami Cloud Hosting - How to - Upgrade

Description:
I have hosted Dolibarr 12.0.3 in AWS via Bitnami Cloud Hosting. I can access the application via SSH. How could I Upgrade it to Version 14.0.0 ? I did try the following resources without success.
https://wiki.dolibarr.org/index.php/Installation_-_Upgrade#Upgrade_Dolibarr

Kindly expect your support
Thanks

Hi @buddhika,

Could you describe the exact steps you followed and the error that you encounter? We have a Support Tool that will gather relevant information for us to analyze your configuration and logs. Could you please execute it on the machine where the stack is running by following the steps described in the guide below?

How to Run the Bitnami Support Tool in a cloud image or virtual machine

Please note that you need to paste the code ID that is shown at the end.

Regards,
Michiel

Hello Michiel,
Thank you for your attention. The exact steps I followed are:

  1. $ cd /opt/bitnami/dolibarr
  2. $ wget https://sourceforge.net/projects/dolibarr/files/
    (** Version 14 is not available, I am afraid.)
  3. $ unzip dolibarr-x.y.z.zip
  4. $ cp -r dolibarr-x.y.z/* htdocs
  5. I did open my dolibarr application in my browser, but did not install the new version automatically.
    I tried the following method too.
    $ cd htdocs/install
    $ php upgrade.php oldx.oldy.oldz x.y.z > output.html
    $ php upgrade2.php oldx.oldy.oldz x.y.z > output2.html
    $ php step5.php oldx.oldy.oldz x.y.z > output3.html
    Nothing happened. No errors.

Please let me know the exact steps to be followed in order to complete the upgradation successfully.
Thank you

Hi @buddhika,

Thank you, can you also run the bnsupport tool and share the output ID with me?

Regards,
Michiel

Dear Michiel,
It is: b6acae43-cb7e-6d3d-b4f6-635e522c7e91

Thanks,

Hi @buddhika,

Please note that you need to rename the install.lock file to be able to upgrade:

mv documents/install.lock documents/install.lock.bak

Regards,
Michiel

bitnami@ip-172-31-41-131:/opt/bitnami/dolibarr$ mv documents/install.lock documents/install.lock.bak
mv: cannot stat ‘documents/install.lock’: No such file or directory

Please check this
Thanks,

Hi @buddhika,

You can look for the file with the following command:

sudo find /opt/bitnami -type f -name install.lock 

Can you check if it’s there?

Regards,
Michiel

Nothing found, I am afraid.
bitnami@ip-172-31-41-131:~$ sudo find /opt/bitnami -type f -name install.lock
bitnami@ip-172-31-41-131:~$

Kind regards,
Buddhika

Hi @buddhika,

Could you ask in a dedicated Dolibar forum? It does not seem related to the Bitnami configuration.

Regards,
Michiel

Could you please repeat the exact steps I have to follow in order to do the upgrade.
Regards,
Buddhika

Hi @buddhika,

Download the Dolibarr 13.4 in the /opt/bitnami folder.

cd /opt/bitnami
wget https://www.dolibarr.org/files/stable/standard/dolibarr-13.0.4.zip  

Then unzip:

unzip dolibarr-13.0.4.zip 

Make a backup of the old htdocs folder:

cp -r apps/dolibarr/htdocs apps/dolibarr/htdocs.bak

Copy the content of the new htdocs folder to the old one:

cp -r dolibarr-13.0.4/htdocs/* apps/dolibarr/htdocs/

Remove the install.lock file:

rm documents/install.lock

Then refresh the page.

Regards,
Michiel

bitnami@ip-172-31-41-131:~$ cd /opt/bitnami
bitnami@ip-172-31-41-131:/opt/bitnami$ wget https://www.dolibarr.org/files/stable/standard/dolibarr-13.0.4.zip
–2021-08-11 03:44:18-- https://www.dolibarr.org/files/stable/standard/dolibarr-13.0.4.zip
Resolving www.dolibarr.org (www.dolibarr.org)… 172.67.199.88, 104.21.13.88, 2606:4700:3034::ac43:c758, …
Connecting to www.dolibarr.org (www.dolibarr.org)|172.67.199.88|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 71862413 (69M) [application/zip]
dolibarr-13.0.4.zip: Permission denied

Cannot write to ‘dolibarr-13.0.4.zip’ (Permission denied).
bitnami@ip-172-31-41-131:/opt/bitnami$
I am not allowed to grant the permission. Kindly expect your advise.

Kind regards,
Buddhika

Hi @buddhika,

Try to prepend sudo to the command (and the subsequent commands):

 sudo wget https://www.dolibarr.org/files/stable/standard/dolibarr-13.0.4.zip

Regards,
Michiel

bitnami@ip-172-31-41-131:/opt/bitnami$ cp -R dolibarr-13.0.4/htdocs/* dolibarr/htdocs/
cp: cannot overwrite non-directory ‘dolibarr/htdocs/conf’ with directory ‘dolibarr-13.0.4/htdocs/conf’
cp: cannot overwrite non-directory ‘dolibarr/htdocs/custom’ with directory ‘dolibarr-13.0.4/htdocs/custom’
bitnami@ip-172-31-41-131:/opt/bitnami$

Please help me to overcome this issue
Kind regards,
Buddhika

Hello @buddhika,

Please try using sudo at the start of every command detailed by my colleague for the upgrade process. If the problem persists, please share the output of the following command:

ls -la dolibarr-13.0.4/htdocs/

Regards,
Francisco de Paz

Hello,

bitnami@ip-172-31-41-131:/opt/bitnami$ ls
apache        bndiagnostic-tool    dolibarr               mariadb         stats
apache2       bnsupport            dolibarr-13.0.4        nami            var
bnagent       bnsupport-regex.ini  dolibarr-13.0.4.zip    php
bncert        bnsupport-tool       gonit                  phpmyadmin
bncert-tool   common               libmod_pagespeed       properties.ini
bndiagnostic  ctlscript.sh         libmod_pagespeed_ap24  scripts
bitnami@ip-172-31-41-131:/opt/bitnami$ sudo cp -r dolibarr-13.0.4/htdocs/* dolibarr/htdocs/
cp: cannot overwrite non-directory 'dolibarr/htdocs/conf' with directory 'dolibarr-13.0.4/htdocs/conf'
cp: cannot overwrite non-directory 'dolibarr/htdocs/custom' with directory 'dolibarr-13.0.4/htdocs/custom'
bitnami@ip-172-31-41-131:/opt/bitnami$

**Still the same problem

bitnami@ip-172-31-41-131:/opt/bitnami$ **ls -la dolibarr-13.0.4/htdocs/**
total 552
drwxrwxr-x  74 root root   4096 Jul 12 12:27 .
drwxr-xr-x   7 root root   4096 Aug 11 06:36 ..
drwxrwxr-x  11 root root   4096 Apr  9 21:02 accountancy
drwxrwxr-x   9 root root   4096 Apr 13 19:59 adherents
drwxrwxr-x   6 root root   4096 Jun 10 16:53 admin
drwxrwxr-x   4 root root   4096 Apr  9 21:02 api
drwxrwxr-x   4 root root   4096 Apr 13 19:59 asset
drwxrwxr-x   2 root root   4096 Apr  9 21:02 asterisk
drwxrwxr-x   2 root root   4096 Apr  9 21:02 barcode
drwxrwxr-x   6 root root   4096 Apr  9 21:02 blockedlog
drwxrwxr-x   5 root root   4096 Apr 13 19:59 bom
drwxrwxr-x   4 root root   4096 Apr  9 21:02 bookmarks
drwxrwxr-x   9 root root   4096 Apr  9 21:02 cashdesk
drwxrwxr-x   4 root root   4096 Apr 13 19:59 categories
drwxrwxr-x   2 root root   4096 Apr  9 21:02 collab
drwxrwxr-x   7 root root   4096 Apr  9 21:02 comm
drwxrwxr-x   5 root root   4096 May 20 14:54 commande
drwxrwxr-x  17 root root   4096 Apr  9 21:02 compta
drwxrwxr-x   2 root root   4096 Jul 12 12:27 conf
drwxrwxr-x   4 root root   4096 Apr 13 19:59 contact
drwxrwxr-x   5 root root   4096 Apr 13 19:59 contrat
drwxrwxr-x  15 root root   4096 Jun  4 09:40 core
drwxrwxr-x   4 root root   4096 Apr  9 21:02 cron
drwxrwxrwx   2 root root   4096 Jul 12 12:27 custom
drwxrwxr-x   7 root root   4096 Apr  9 21:02 datapolicy
drwxrwxr-x   2 root root   4096 Apr  9 21:02 dav
drwxrwxr-x   4 root root   4096 Apr  9 21:02 debugbar
drwxrwxr-x   3 root root   4096 Apr  9 21:02 delivery
-rw-rw-r--   1 root root  11033 Apr  9 21:02 document.php
drwxrwxr-x   7 root root   4096 Apr 13 19:59 don
drwxrwxr-x   5 root root   4096 Apr  9 21:02 ecm
drwxrwxr-x   4 root root   4096 Apr  9 21:02 emailcollector
drwxrwxr-x   5 root root   4096 Jun  4 09:40 expedition
drwxrwxr-x   7 root root   4096 Apr 13 19:59 expensereport
drwxrwxr-x   3 root root   4096 Apr  9 21:02 exports
drwxrwxr-x   3 root root   4096 Apr  9 21:02 externalsite
-rw-rw-r--   1 root root   2238 Apr  9 21:02 favicon.ico
drwxrwxr-x   6 root root   4096 Apr 24 18:52 fichinter
-rw-rw-r--   1 root root  16509 Jun 19 19:24 filefunc.inc.php
drwxrwxr-x   9 root root   4096 Apr  9 21:02 fourn
drwxrwxr-x   3 root root   4096 Apr  9 21:02 ftp
drwxrwxr-x   4 root root   4096 Jun  4 09:40 holiday
drwxrwxr-x   5 root root   4096 Apr  9 21:02 hrm
drwxrwxr-x   3 root root   4096 Apr  9 21:02 imports
drwxrwxr-x  29 root root   4096 Apr  9 21:02 includes
-rw-rw-r--   1 root root  43124 Apr  9 21:02 index.php
drwxrwxr-x   7 root root   4096 Jul 12 12:27 install
drwxrwxr-x   4 root root   4096 Apr  9 21:02 intracommreport
drwxrwxr-x 100 root root   4096 Apr  9 21:02 langs
drwxrwxr-x   4 root root   4096 Apr 13 19:59 loan
drwxrwxr-x   3 root root   4096 Apr  9 21:02 mailmanspip
-rw-rw-r--   1 root root 140138 Jul  7 14:40 main.inc.php
drwxrwxr-x   5 root root   4096 Apr  9 21:02 margin
-rw-rw-r--   1 root root   9604 Apr  9 21:02 master.inc.php
drwxrwxr-x   4 root root   4096 Apr  9 21:02 modulebuilder
drwxrwxr-x   7 root root   4096 Apr 13 19:59 mrp
drwxrwxr-x   3 root root   4096 Apr  9 21:02 multicurrency
-rw-rw-r--   1 root root   1147 Apr  9 21:02 opcachepreload.php
drwxrwxr-x   6 root root   4096 Apr  9 21:02 opensurvey
drwxrwxr-x   5 root root   4096 Apr  9 21:02 paybox
drwxrwxr-x   5 root root   4096 Apr  9 21:02 paypal
drwxrwxr-x   4 root root   4096 Apr  9 21:02 printing
drwxrwxr-x  11 root root   4096 May 20 14:54 product
drwxrwxr-x   8 root root   4096 Apr 13 19:59 projet
drwxrwxr-x  16 root root   4096 Jul 12 12:27 public
drwxrwxr-x   5 root root   4096 Apr  9 21:02 reception
drwxrwxr-x   7 root root   4096 Apr 13 19:59 recruitment
drwxrwxr-x   3 root root   4096 Apr 13 19:59 resource
-rw-rw-r--   1 root root    115 Apr  9 21:02 robots.txt
drwxrwxr-x   5 root root   4096 Apr 13 19:59 salaries
-rw-rw-r--   1 root root    210 Apr  9 21:02 security.txt
drwxrwxr-x   9 root root   4096 Jun  4 11:05 societe
drwxrwxr-x   5 root root   4096 Apr  9 21:02 stripe
drwxrwxr-x   5 root root   4096 Apr 13 19:59 supplier_proposal
drwxrwxr-x   2 root root   4096 Apr  9 21:02 support
drwxrwxr-x  10 root root   4096 Apr  9 21:02 takepos
drwxrwxr-x   5 root root   4096 Jul 12 12:27 theme
drwxrwxr-x   7 root root   4096 Jun 15 22:08 ticket
drwxrwxr-x   6 root root   4096 May 27 14:23 user
drwxrwxr-x   6 root root   4096 Apr  9 21:02 variants
-rw-rw-r--   1 root root  11406 Apr  9 21:02 viewimage.php
drwxrwxr-x   3 root root   4096 Apr  9 21:02 webservices
drwxrwxr-x   5 root root   4096 Apr  9 21:02 website
drwxrwxr-x   6 root root   4096 Apr  9 21:02 zapier
bitnami@ip-172-31-41-131:/opt/bitnami$ 

Kindly expect your support
Regards
Buddhika

Hello @buddhika,

You are right, our symlinks are causing problems in the migration process. I will paste here the whole upgrade process from 12.0.4 to 13.0.4:

Download the Dolibarr 13.4 in the /opt/bitnami folder.

cd /opt/bitnami
sudo wget https://www.dolibarr.org/files/stable/standard/dolibarr-13.0.4.zip  

Then unzip:

unzip /opt/bitnami/dolibarr-13.0.4.zip 

Make a backup of the old htdocs folder:

cp -r /opt/bitnami/dolibarr/htdocs /opt/bitnami/dolibarr/htdocs.bak

Copy the conf and custom folders to their symlink source at /bitnami/dolibarr/htdocs:

cp -r /opt/bitnami/dolibarr-13.0.4/htdocs/conf /bitnami/dolibarr/htdocs/conf/
cp -r /opt/bitnami/dolibarr-13.0.4/htdocs/custom /bitnami/dolibarr/htdocs/custom/

Remove the previous folders to avoid copying them again:

sudo m -rf /opt/bitnami/dolibarr-13.0.4/htdocs/custom /opt/bitnami/dolibarr-13.0.4/htdocs/conf

Copy the content of the new htdocs folder to the old one:

cp -r /opt/bitnami/dolibarr-13.0.4/htdocs/* /opt/bitnami/dolibarr/htdocs/

Go to the UI and follow the steps to finish the migration.

The steps to upgrade from version 13 to 14 should be the same but do not doubt to ping us if you encounter any other error.

Regards,
Francisco de Paz

Dear Francisco,
Thank you for your help. It works.

Regards,
Buddhika

Hi @buddhika,

I’m glad to hear it works now. We will update the documentation.

Regards,
Michiel