Help Needed: Restoring Dolibarr Backup on New Docker Instance

Hello,

I am encountering an issue while trying to restore a backup from my old Dolibarr instance to a new one using Docker. Here are the steps I followed:

On my old instance:

I created a backup of the MySQL database:

docker exec CONTAINER_NAME_MYSQL mysqldump -u USERNAME -pPASSWORD DATABASE_NAME > /path/to/backup.sql

I copied the documents directory from the Dolibarr container to my host machine:

docker cp CONTAINER_NAME_DOLIBARR:/var/www/documents /backup/path/on/host

On my new instance:

I restored the MySQL database from the backup:

docker exec -i CONTAINER_NAME_MYSQL mariadb -u USERNAME -pPASSWORD DATABASE_NAME < /path/to/backup.sql

I copied the documents directory back to the new Dolibarr container:

docker cp /backup/path/on/host CONTAINER_NAME_DOLIBARR:/var/www/documents

After completing these steps, I can see a /documents/Dolibarr_Backup/ directory with my previously backed up db and documents, but my Dolibarr instance appears empty, as if the backup was not applied.

I believe I might be missing a step or doing something incorrectly. Could someone please guide me on what I might be missing or suggest any additional steps to successfully restore my Dolibarr instance?

Thank you in advance for your help!

Can you see the data inside your database?

What if you use the GUI method of dolibarr to restore the database?

I am very sorry, I am not conformable with this, I don’t know how to check that.

I have no knowledge of this method. How can this be done?

@Tiritibambix

If your dolibarr is empty means that your dolibarr is not connected to the right database or db user or db prefix.
Check what is on conf/conf.php

I searched my entire installation directory and can’t find a conf.php file

If that helps, I use a Docker installation

I bashed into my db container
Connected to the db and checked what db was in
I did SHOW DATABASES; and I have 2 entries:
±-------------------+
| Database |
±-------------------+
| dolibarr |
| information_schema |
±-------------------+

So after copying my backup into the db container at /tmp/, I tried
maraidb -u dolibarr -p dolibarr < /tmp/mybackup.sql

I have no message at all, so I suppose it worked.
So I restarded both containers, but I still don’t have my data back.

This is so frustrating. I need to learn too many things to restore this backup, and I really need it :frowning:

I had to install phpMyAdmin, delete all tables and import my backup.

Jeez, I spent my whole Sunday on this.

There has to be an easier way of restoring for noobs and non-technical people.
I’m glad I know a little about computers to make my way through this hell :face_exhaling:

1 Like

In the admin menu there is a restore option?

but looking closer I see that it does not have a GUI method :frowning:

Yes, my GUI method was installing phpMyAdmin. The built-in solution was not displaying, or not in any obvious way, errors that were blocking the process.

I am very surprised that a tool as powerful as Dolibarr, managing data vital to many companies and entrepreneurs, does not have a system of backup and restoration worthy of its reputation.