Migrer mon Dolibarr vers une offre Cloud
J'utilise Dolibarr sur un autre serveur. Comment puis-je migrer vers DoliCloud (Hébergement de Dolibarr dans le Cloud) ?
Cette description fonctionne pour tout utilisateur d'une instance de Dolibarr basée sur une base de donnée MySql.
Vous pouvez exécuter le processus de migration vous-même en suivant ce tutorial. Toutefois, si vous avez besoin de plus d'aide, vous pouvez poser vos questions à support@dolicloud.com (le support à la migration est inclus dans toutes les offres, y compris l'offre Basic).
Pré-requis
- Vérifier que la version de votre Dolibarr (vous la trouverez sur la page de login) est plus faible ou égale à la version de DoliCloud (Dans la plupart des cas, cela doit être vrai car les offres DoliCloud se basent sur la dernière version stable).
Si votre version locale est ancienne, vous pouvez réaliser une mise à jour locallement mais ce n'est pas obligatoire, la mise à jour pourra aussi se faire après migration vers DoliCloud.
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 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:
mysqldump -h ip_of_old_mysql_server -P port_of_old_mysql_server -u user_database -ppassword_database > myoldserverdump.YYYYMMDD.sql
- Open file myoldserverdump.YYYYMMDD.sql to see if file is complete: File should end with such a line:
-- Dump completed on YYYY-MM-DD HH:mm:ss
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).
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.
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.
- Then log to your new DoliCloud dashboard. You will find an area with your SFTP identifiers.
With any SFTP software (WinSCP or FileZilla for Windows, Nautilus for most Linux), login to DoliCloud using SFTP protocol. Copy all documents files and sub-directories you saved from previous step into the DoliCloud document directory.
Step 5 - Load your old database
- 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).
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" be 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.