Migrate my Dolibarr To the Cloud: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
Tag: 2017 source edit
mNo edit summary
Tag: 2017 source edit
Line 26: Line 26:


Note: If you experience problem running this command (for example because your old hosting provider does not allow to run command mysqldump), you can launch the command from any other computer where MySql client software is installed. For this, run the following command:
Note: If you experience problem running this command (for example because your old hosting provider does not allow to run command mysqldump), you can launch the command from any other computer where MySql client software is installed. For this, run the following command:
<source lang="bash">
<syntaxHighlight lang="bash">
mysqldump -h ip_of_old_mysql_server -P port_of_old_mysql_server -u user_database -ppassword_database > mysqldump_YYYYMMDDHHMMSS.sql
mysqldump -h ip_of_old_mysql_server -P port_of_old_mysql_server -u user_database -ppassword_database > mysqldump_YYYYMMDDHHMMSS.sql
</source>
</syntaxHighlight>




* Open the generated dump/backup file (name should looks like mysqldump_A.B.C_YYYYMMDDHHMMSS.sql) to see if file is complete: File should end with such a line:
* Open the generated dump/backup file (name should looks like mysqldump_A.B.C_YYYYMMDDHHMMSS.sql) to see if file is complete: File should end with such a line:
<source lang="sql">
<syntaxHighlight lang="sql">
-- Dump completed on YYYY-MM-DD HH:mm:ss
-- Dump completed on YYYY-MM-DD HH:mm:ss
</source>
</syntaxHighlight>
If yes, record this file in a secured place. It will be required at step 5.
If yes, record this file in a secured place. It will be required at step 5.


Line 80: Line 80:
* Log to your new DoliCloud customer dashboard again. You will find an area with your Mysql identifiers.
* Log to your new DoliCloud customer dashboard again. You will find an area with your Mysql identifiers.
Go on any computer where MySql and mysqldump command is install. Launch the following command to save the new DoliCloud initialized database (to restore DoliCloud if something is wrong later).
Go on any computer where MySql and mysqldump command is install. Launch the following command to save the new DoliCloud initialized database (to restore DoliCloud if something is wrong later).
<source lang="bash">
<syntaxHighlight lang="bash">
mysqldump -h yourinstance.with.dolicloud.com -P 3306 -u doliclouduser -pdolicloudpassword doliclouddatabase > dolicloud.YYYYMMDD.sql
mysqldump -h yourinstance.with.dolicloud.com -P 3306 -u doliclouduser -pdolicloudpassword doliclouddatabase > dolicloud.YYYYMMDD.sql
</source>
</syntaxHighlight>
where all information yourinstance.with.dolicloud.com ,doliclouduser, dolicloudpassword and doliclouddatabase can be found onto your DoliCloud dashboard.
where all information yourinstance.with.dolicloud.com ,doliclouduser, dolicloudpassword and doliclouddatabase can be found onto your DoliCloud dashboard.


* Run the following command to overwrite database with database of your old server.
* Run the following command to overwrite database with database of your old server.
<source lang="bash">
<syntaxHighlight lang="bash">
mysql -h yourinstance.on.dolicloud.com -P 3306 -D doliclouddatabase -u doliclouduser -pdolicloudpassword < myoldserverdump.YYYYMMDD.sql
mysql -h yourinstance.on.dolicloud.com -P 3306 -D doliclouddatabase -u doliclouduser -pdolicloudpassword < myoldserverdump.YYYYMMDD.sql
</source>
</syntaxHighlight>


[[Image:Warning.png]] Note: If you get an error like ''"ERROR 1005 (HY000) at line 25: Can't create table `...`.`llx_accounting_account` (errno: 150 "Foreign key constraint is incorrectly formed")"'', remove/drop manually the  
[[Image:Warning.png]] Note: If you get an error like ''"ERROR 1005 (HY000) at line 25: Can't create table `...`.`llx_accounting_account` (errno: 150 "Foreign key constraint is incorrectly formed")"'', remove/drop manually the  

Navigation menu