Difference between revisions of "Migrar en un servicio en la Nube (Cloud)"

From Dolibarr ERP CRM Wiki
Jump to navigation Jump to search
Line 1: Line 1:
 
{{ToTranslate}}
 
{{ToTranslate}}
 +
<keywords content="migrate, switch, restoration, restoring, instance, on line, hosting, server, change, DoliCloud, Dolibarr" />
 
[[File:Reseau.png]]  '''I use Dolibarr onto another server. How can I migrate to [http://www.dolicloud.com DoliCloud] (Dolibarr hosting service in the Cloud) ?'''
 
[[File:Reseau.png]]  '''I use Dolibarr onto another server. How can I migrate to [http://www.dolicloud.com DoliCloud] (Dolibarr hosting service in the Cloud) ?'''
  
This description works for every users using a MySql database.  
+
This description explain how to move an existing instance of Dolibarr ERP & CRM into a remote web hosting service in the Cloud. Tutorial should works for every Dolibarr installation using a MySql database. Example is provided with [http://www.dolicloud.com DoliCloud] (but you should be able to replace all things specific to DoliCloud with any other Dolibarr SaaS provider).
  
 
You can execute all the migrate process yourself following this tutorial.
 
You can execute all the migrate process yourself following this tutorial.
Line 13: Line 14:
 
= Prerequisites =
 
= Prerequisites =
 
* Check that you Dolibarr version (you will find it onto logon page) is lower or equals to DoliCloud version (In most cases, it should be true because DoliCloud plan offers the last stable version).
 
* Check that you Dolibarr version (you will find it onto logon page) is lower or equals to DoliCloud version (In most cases, it should be true because DoliCloud plan offers the last stable version).
If your local version is older, it is better to upgrade first locally to same version than DoliCloud, but not necessarily. Upgrade process can be done after migration to DoliCloud (see later).
+
If your local version is older, it is better to upgrade first locally to same version than DoliCloud, but not necessarily. Upgrade process can also be done after migration to DoliCloud (see later).
  
 
= Step 1 - Backup your old database =
 
= Step 1 - Backup your old database =
* First step is to backup your database.
+
* First step is to backup your database. For this, go into menu '''Home - System tools - Backup'''. Click to generate a backup file (with mysqldump method). This will launch mysqldump command and show you the generated file.
For this, go into menu '''Home - System tools - Backup'''. Click to generate a backup file (with mysqldump method). This will launch mysqldump command and show you the command.
+
 
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 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">
 
<source lang="bash">
 
mysqldump -h ip_of_old_mysql_server -P port_of_old_mysql_server -u user_database -ppassword_database > myoldserverdump.YYYYMMDD.sql
 
mysqldump -h ip_of_old_mysql_server -P port_of_old_mysql_server -u user_database -ppassword_database > myoldserverdump.YYYYMMDD.sql
Line 24: Line 25:
  
  
* Open backup file 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">
 
<source lang="sql">
 
-- Dump completed on YYYY-MM-DD HH:mm:ss
 
-- Dump completed on YYYY-MM-DD HH:mm:ss
 
</source>
 
</source>
 +
If yes, record this file in a secured place. It will be required at step 5.
 +
 +
= Step 2 - Backup content of your documents directory =
 +
All files uploaded or generated using Dolibarr are stored into a directory called '''documents''' or '''dolibarr_documents'''. To know full path of this directory, go into menu '''Home - System info - Dolibarr - All parameters'''. Full path where all you files are stored is visible on line starting with key '''dolibarr_main_data_root'''.
  
= Step 2 - Copy content of your document files =
 
All uploaded or generated files are stored into the document directory. To know path of this directory, go into menu '''Home - System info - Dolibarr - All parameters'''. Full path where all you files are stored is visible on line with key '''dolibarr_main_data_root'''.
 
 
Save this directory and all its content (subdirectories and files).
 
Save this directory and all its content (subdirectories and files).
 +
Note: sometimes, a file called '''dolibarr.log''' may be found into the root of this directory. If you find it you can remote it safely before building your zip file. This will reduce its size.
  
 
= Step 3 - Create a DoliCloud instance =
 
= Step 3 - Create a DoliCloud instance =
Go onto http://www.dolicloud.com and subscribe to create a new instance. Note that creating an instance is free for 15 days.
+
If you don't have your own DoliCloud instance, go onto http://www.dolicloud.com and subscribe to create a new instance. Note that creating your instance is completely free (for 15 days). But you can ask to increase this period if you need more time to complete your migration or to decide if you will continue or not using the service.
  
 
= Step 4 - Upload documents into DoliCloud =
 
= Step 4 - Upload documents into DoliCloud =
Once instance is created, you receive a mail with id to log to Dolibarr and to log to your dashboard.
 
  
* First, log to your new Dolibarr instance. Go into menu '''Home - System info - Dolibarr - All parameters'''. You will find on line for key '''dolibarr_main_data_root''', the value of full path of directory where documents are stored on DoliCloud instance.
+
== If you don't have knowledge in using a FTP software ==
 +
 
 +
Just send the file generated during step 2 by Email to '''support@dolicloud.com''' (or if it is to large, provide it on a Google Drive or DropBox platform) and add the following message into your email  "'''To migrate into my new DoliCloud instance called xxx.on.dolicloud.com'''" (replace xxx by name of your instance). Our support team will overwrite your documents directory of your new empty DoliCloud instance with files of your old installation and will answer you once action is done.
 +
 +
== If you have technical knowledge in usign a FTP software ==
 +
 
 +
You can do this step yourself by following this process to replace files into your documents directory of your DoliCloud instance with files of your old installation:
 +
 
 +
Once DoliCloud instance has been created, you should have received an email with id to log to Dolibarr and to log to your customer dashboard.
 +
 
 +
* First, log to your new Dolibarr instance on DoliCloud. Go into menu '''Home - System info - Dolibarr - All parameters'''. You will find on line for key '''dolibarr_main_data_root''', the value of full path of directory where documents are stored on DoliCloud instance.
 +
 
 +
* Then log to your new DoliCloud customer dashboard (http://www.on.dolicloud.com). You will find an area with your SFTP credentials identifiers.
 +
 
 +
* With any SFTP software (WinSCP or FileZilla for Windows, Nautilus for most Linux), login to DoliCloud using SFTP protocol and thoose credentials, to copy all documents files and sub-directories you saved from previous step into the DoliCloud document directory identified at previous step.
 +
A more complete tutorial to connect with SFTP and transfer files may be found here: http://dolicloud.com/en/faq/142-faq-how-to-setup-my-sftp
 +
 
 +
= Step 5 - Load your old database into DoliCloud =
 +
 
 +
== If you do not have technical knowledge in Mysql database management software ==
 +
 
 +
Simply send the file generated in step 1 by email to '''support@dolicloud.com''' indicating in the message "To migrate into my new dolicloud instance called xxx.on.dolicloud.com". Our support team will replace your empty new DoliCloud instance with data of your old database and will answer you by email as soon as work is done.
  
* Then log to your new DoliCloud customer dashboard. You will find an area with your SFTP credentials identifiers.
+
== If you have technical knowledge in Mysql database management software ==
  
* With any SFTP software (WinSCP or FileZilla for Windows, Nautilus for most Linux), login to DoliCloud using SFTP protocol and thoose credentials. Copy all documents files and sub-directories you saved from previous step into the DoliCloud document directory.
+
You can use the following procedure to replace the database of your new DoliCloud instance by data of your old installation.
  
= Step 5 - Load your old database =
+
* Log to your new DoliCloud customer dashboard again. You will find an area with your Mysql identifiers.
* Log to your new DoliCloud 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">
 
<source lang="bash">
Line 61: Line 84:
 
Now, call your Dolibarr login page into DoliCloud.  
 
Now, call your Dolibarr login page into DoliCloud.  
  
If your old Dolibarr version was older than DoliCloud Dolibarr version, you should receive a page to ask you to launch the upgrade process. Just choose the choice suggested by the upgrade wizard. If you receive a message saying upgrade is "locked" be file '''install.lock''', launch again your SFTP client and remove the file '''documents/install.lock'''.
+
If your old Dolibarr version was older than DoliCloud Dolibarr version, you should receive a page to ask you to launch the upgrade process. Just choose the choice suggested by the upgrade wizard. If you receive a message saying upgrade is "locked" by file '''install.lock''', launch again your SFTP client and remove the file '''documents/install.lock'''.
  
 
Once upgrade is done, or if your version was same than DoliCloud, you can connect using a user that did exists into old server database, with same password.
 
Once upgrade is done, or if your version was same than DoliCloud, you can connect using a user that did exists into old server database, with same password.
 
Your admin user created during DoliCloud init does no more exists as it was overwritten by the database load at previous step.
 
Your admin user created during DoliCloud init does no more exists as it was overwritten by the database load at previous step.

Revision as of 00:51, 1 February 2016

En verysmall.png Page waiting for translation. To translate, create an account, go back and clic on "Modify".
Fr verysmall.png Page en attente de traduction. Pour traduire, créez un compte, revenez et cliquez sur "Modifier".
Es verysmall.png Página a traducir. Para traducirla, cree una cuenta, vuelva a la página y haga clic en "editar".
It verysmall.png Pagina da tradurre. Per tradurla, crea un utente, torna indietro e clicca su "modifica".
Pt verysmall.png Página a aguardar por tradução. Para traduzir, crie uma conta, volte atrás e clique em "Modificar".
De verysmall.png Seite wartet auf Übersetzung. Um Übersetzung zu erstellen, richte einen Account ein, geh zurück und klicke auf "bearbeiten".
Zh verysmall.png 页面等待翻译。若要翻译本页,先创建一个帐户、登录并返回本页后单击“编辑”。

<keywords content="migrate, switch, restoration, restoring, instance, on line, hosting, server, change, DoliCloud, Dolibarr" /> Reseau.png I use Dolibarr onto another server. How can I migrate to DoliCloud (Dolibarr hosting service in the Cloud) ?

This description explain how to move an existing instance of Dolibarr ERP & CRM into a remote web hosting service in the Cloud. Tutorial should works for every Dolibarr installation using a MySql database. Example is provided with DoliCloud (but you should be able to replace all things specific to DoliCloud with any other Dolibarr SaaS provider).

You can execute all the migrate process yourself following this tutorial. However, if you need more help, you can ask questions to support@dolicloud.com (support is free, even with the Basic Plan for any migration/setup questions).



Prerequisites

  • Check that you Dolibarr version (you will find it onto logon page) is lower or equals to DoliCloud version (In most cases, it should be true because DoliCloud plan offers the last stable version).

If your local version is older, it is better to upgrade first locally to same version than DoliCloud, but not necessarily. Upgrade process can also be done after migration to DoliCloud (see later).

Step 1 - Backup your old database

  • First step is to backup your database. For this, go into menu Home - System tools - Backup. Click to generate a backup file (with mysqldump method). This will launch mysqldump command and show you the generated file.

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:

mysqldump -h ip_of_old_mysql_server -P port_of_old_mysql_server -u user_database -ppassword_database > myoldserverdump.YYYYMMDD.sql


  • 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:
-- Dump completed on YYYY-MM-DD HH:mm:ss

If yes, record this file in a secured place. It will be required at step 5.

Step 2 - Backup content of your documents directory

All files uploaded or generated using Dolibarr are stored into a directory called documents or dolibarr_documents. To know full path of this directory, go into menu Home - System info - Dolibarr - All parameters. Full path where all you files are stored is visible on line starting with key dolibarr_main_data_root.

Save this directory and all its content (subdirectories and files). Note: sometimes, a file called dolibarr.log may be found into the root of this directory. If you find it you can remote it safely before building your zip file. This will reduce its size.

Step 3 - Create a DoliCloud instance

If you don't have your own DoliCloud instance, go onto http://www.dolicloud.com and subscribe to create a new instance. Note that creating your instance is completely free (for 15 days). But you can ask to increase this period if you need more time to complete your migration or to decide if you will continue or not using the service.

Step 4 - Upload documents into DoliCloud

If you don't have knowledge in using a FTP software

Just send the file generated during step 2 by Email to support@dolicloud.com (or if it is to large, provide it on a Google Drive or DropBox platform) and add the following message into your email "To migrate into my new DoliCloud instance called xxx.on.dolicloud.com" (replace xxx by name of your instance). Our support team will overwrite your documents directory of your new empty DoliCloud instance with files of your old installation and will answer you once action is done.

If you have technical knowledge in usign a FTP software

You can do this step yourself by following this process to replace files into your documents directory of your DoliCloud instance with files of your old installation:

Once DoliCloud instance has been created, you should have received an email with id to log to Dolibarr and to log to your customer dashboard.

  • First, log to your new Dolibarr instance on DoliCloud. Go into menu Home - System info - Dolibarr - All parameters. You will find on line for key dolibarr_main_data_root, the value of full path of directory where documents are stored on DoliCloud instance.
  • Then log to your new DoliCloud customer dashboard (http://www.on.dolicloud.com). You will find an area with your SFTP credentials identifiers.
  • With any SFTP software (WinSCP or FileZilla for Windows, Nautilus for most Linux), login to DoliCloud using SFTP protocol and thoose credentials, to copy all documents files and sub-directories you saved from previous step into the DoliCloud document directory identified at previous step.

A more complete tutorial to connect with SFTP and transfer files may be found here: http://dolicloud.com/en/faq/142-faq-how-to-setup-my-sftp

Step 5 - Load your old database into DoliCloud

If you do not have technical knowledge in Mysql database management software

Simply send the file generated in step 1 by email to support@dolicloud.com indicating in the message "To migrate into my new dolicloud instance called xxx.on.dolicloud.com". Our support team will replace your empty new DoliCloud instance with data of your old database and will answer you by email as soon as work is done.

If you have technical knowledge in Mysql database management software

You can use the following procedure to replace the database of your new DoliCloud instance by data of your old installation.

  • 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).

mysqldump -h yourinstance.on.dolicloud.com -P 3306 -u doliclouduser -pdolicloudpassword -Ddoliclouddatabase > dolicloud.YYYYMMDD.sql

where all information yourinstance.on.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.
mysql -h yourinstance.on.dolicloud.com -P 3306 -D doliclouddatabase -u doliclouduser -pdolicloudpassword < myoldserverdump.YYYYMMDD.sql

Test

Now, call your Dolibarr login page into DoliCloud.

If your old Dolibarr version was older than DoliCloud Dolibarr version, you should receive a page to ask you to launch the upgrade process. Just choose the choice suggested by the upgrade wizard. If you receive a message saying upgrade is "locked" by file install.lock, launch again your SFTP client and remove the file documents/install.lock.

Once upgrade is done, or if your version was same than DoliCloud, you can connect using a user that did exists into old server database, with same password. Your admin user created during DoliCloud init does no more exists as it was overwritten by the database load at previous step.