How do you use Dolibarr if the backup restore doesn't work?

I’m trying to restore the system backup that I’ve been using for over two years and I can’t in every way with the error when restoring.

Hi

What do you try ?
Can you show your steps ?

Hi

I think i found your the other topic about the issue .

Maybe you could follow my steps to see if it work or not .

Let me know if this steps work for you or not .

Thanks for helping !

I tried to restore using both versions 13 on the old server and 13 on the new server but without success, so I updated to version 15.0.1 the old server and the new one without success too. I’m trying to do it through the command line and through Phmyadmin, but the same error is reported in both

Hi

Before you import ( restore ) the old backup sql file , do you delete all old tables in your dolibarr DB ?

I delete but I get the time out error

Hi

Please take a screenshot of it .
And if it shown a timeout error , do you confirm all tables have deleted again ?

This is what I do. (Postgresql)

  1. On the OLD server I do a database backup.

  2. On the NEW server I create empty database.

  3. Restore the backup to the newly created database

  4. Copy Dolibarr files to new server.

  5. Run Dolibarr. (If the login or database names is not the same as the old you can edit the conf.php)

Not used it enough yet, however i have had restore work perfectly and ive had it fail. Seems to be a possible error in the username / password encryption methods.

Generally we use MySQL which has its own backup / migration feature which works well (we moved other databases with it), we will be diving in to this and testing this feature way more though in the future.

I will review the process and try again.

My other question is about how to use a system that the backup and restore method does not work as it should, the instructions given above to restore the backup do not work most of the time and how a system that is constantly being updated does not improve it.

In order to improve Dolibarr, I think it needs to be found out, why backup and restore are failing in your case. In general, these functions should work - and personally I can confirm they do with my installations, where I do not have the issues you described. So there must be something particular going on.

I can just guess, but a failure during a release upgrade or perhaps even an external module could have caused some inconsistency resulting in your trouble.

When i looked at this, it sent a command to SQL to export the database, then the restore command restored that complete database back. The problem with this is 2 fold:

  • Reliance on the database actually exporting all contents correctly
  • The reliance of the new database “liking” the backup the old one created.

Knowing the above that means the new database has to be identical to the old one, both model, version and how the username and password are stored to access it (this is something ive come accross that can be an issue).

I personally feel the backup method should be inside Dolibar, so IT copies all the data out, saves it, then the restore does the same, this would then not rely on the database itself, rather once Dolibar connects to the new database it then squirts all the data back in. This method would allow for double checking, so when its backed up, it could re-read the flat datafiles it created against the running database to verify all the data it pulled is correct. The same for restore, when pushing that data back in it could double check the database against the flat file to verify all data was written.

We (in 2020) started a project to create a plugin, the above is how we would backup our data, although this project has been stalled due to covid and money.

Hi All

If by my steps , then i found that will cause a issue of private note of proposal and order .
It will show a error message when i edit the old proposal or order but not show in new proposal or order .

You could find more message in here .