This guide covers the migration of the application to another machine.
Two migration methods are presented. The first method is to copy the whole meican installation directory to the new sever (1) and second method is to copy only the necessary files to a new MEICAN installation (2).
Make sure that the software requirements are configured as defined in the installation guide for your operating system. After that, proceed to the next step.
The quick backup method is copy all files from the current installation. Replace the #USER# and #HOST# with your user and old server address. After that, run the following command in your new server:
sudo rsync -a #USER#@#HOST#:/path/to/old/meican /path/to/new/meican
Now that you already have the files you need the database from the old machine. Follow the step 2.3 to get the backup and 2.7 to import the database on the new server.
Test your application accessing http://localhost and verify some pages. If you detect some wrong this method may not work in your system. In this case you should follow the method 2.
Your new server will have the same domain? If yes, you need a backup of the all files from certificates folder. This folder is located in the project root.
Backup the following files from config folder: "db.php", "mailer.php" and "params.php". This folder is located in the project root.
Export the MEICAN database. By default the database name is meican. Overwrite #USER# and #PASS# with your credentials and execute this command:
mysqldump -u #USER# -p#PASS# --databases meican > backup.sql
Following the installation guide respective, setup a complete new MEICAN instance on the new machine skipping the configuration step. IMPORTANT: if you are not doing an upgrade, make sure that the version of the new installation is exactly the same of the old server.
From the backup, copy the certificate to the certificates folder on the new server.
From the backup, copy the files: "db.php", "mailer.php" and "params.php" to the config folder on the new server.
This is step is exclusive for a migration of the application. If you are doing an upgrade, look the next step on Upgrade Guide.
Access the MySQL terminal:
mysql -u #USER# -p#PASS#
Delete the database generated by the new installation of the step 2.4.
DROP DATABASE IF EXISTS `meican`;
Now, create a new database for receive the backup database.
CREATE DATABASE IF NOT EXISTS `meican`;
After this, from the backup, import the database on the new machine. Out of the MySQL terminal run:
mysql -u #USER# -p#PASS# -h localhost meican < backup.sql
After all these steps, the migration is done. Commonly is required some changes on the old configurations.
Test your application accessing http://localhost