Restore DB help - urgent

I am in dire need of help. I am quite a newbie working with DBs (though have project managed many SQL/Oracle projects so am familiar, just never done the actual coding). Basically Windows crashed and burned, this was just as I was trying to update from 10.0.6 to 12.0.3. I have a backup of all files, but no working Dolibarr (aside from new installs) to go back to. Of course I have no recent dump file :(. I do have 3rd party software I can use as well.

I tried installing 10.0.6 on a different machine and overwriting the data files (or what I thought was the data files) and tried selective files as well as the entire backed up dolibarr folder. I was able to login 1 time and see the data, but could not create a dump file, after which the login would no longer work (only worked 1st time for some reason).

Trying to create a dump file from command line gives me errors as well ( error: 1146: Table ‘tablename’ doesn’t exist when doing LOCK TABLES), tried disabling lock tables using switch in command line with no luck. Also got “php safe mode safe_mode_exec_dir off” error.

How can I extract the data from the raw files? If I use a 3rd party software, what files do I need to open to create a new dump so I can import into new installation (10.0.6 or 12.0.3)?

This is a primary business/office software so quite urgent. Any/all help is greatly appreciated!

Windows 10 Pro (was running RAID so have 1 copy left untouched)
Have all original files, and was able to fix windows on another PC (original also had hardware failures so dead to the world) but no working installation of Dolibarr there either since it died during upgrade.

Thanks in advance!

Ted

Hi guy!
Sorry to hear that.
First of all please remember you should backup all data before upgrading. SQL Dump and documents of Dolibarr folder, custom folder (If you have extra module).
Then as you said:
“I tried installing 10.0.6 on a different machine and overwriting the data files (or what I thought was the data files) and tried selective files as well as the entire backed up dolibarr folder. I was able to login 1 time and see the data, but could not create a dump file, after which the login would no longer work (only worked 1st time for some reason).” <- Is it lets you see all datas there? If you can see all datas could you try one more time with grant permission to write for Dolibarr?

_ And this error “error: 1146: Table ‘tablename’ doesn’t exist when doing LOCK TABLES” possible reason:
"permission and ownership on tables files in /var/lib/mysql is not correct, ideal ownership should be to mysql user and permission 660.

  • table not exist, check with show tables.
  • table created in uppercase, set lower_case_table_names as per your application requirement.
  • table is corrupt, repair the table"
    Different machine, user, local path, you need to check and grant permission again.
    If you cannot recover please post also:
  1. Your database is using.
  2. Webserver is using.
    And hope someone can help.
    Regards.

Thanks so much for the prompt reply. I was able to get the export to work via Dolibarr admin page, and am now working on testing it by importing on another instance of Dolibarr on another PC. :slight_smile: :smiley:

What worked for me in the end was fixing Windows on the old machine and hooking the HD up to another PC. Then I was able to just overwrite all the tables and ibdata1 files. Then the export went fine. I assume that by copying the files over to another drive the permissions get all wonky and caused the majority of the problems (kind of as you mentioned). Actually having some of the same issues importing the sqldump file now as well, but think I can handle it.

Thanks again!! Much appreciated.

Ted

1 Like