Migrating to MDOQ is easier then you might think! This guide will take you through the process of creating/setting up a production instance (production site) on MDOQ.
We are always working on improving the process if you have any suggestions please get in touch.
Before beginning this process you will need to have a production account set up within MDOQ, if you're unsure don't hesitate to contact us.
Prerequisites
The following aren't mandatory but are nice to have, we can of course assist you with setting these up.
- Code base should be in source control with Github or Bitbucket
Instructions
Some of these steps are marked as optional as they aren't required, but does make things a little easier if they can be done.
1. Code Backup (optional)
If you don't have a running version of your site you can skip this step.
Generate a code backup of your site. This backup should be the code base, excluding media.
- SSH into your webserver
- Change directory to the web root, and change user to the Magento web user.
- Create a .tgz of the code base
php bin/magento setup:backup --code
This will create a code backup in the "var/backups" directory
2. Database Backup (optional)
If you don't have a running version of your site you can skip this step.
Generate a database backup.
- SSH into your webserver
- Change directory to the web root, and change user to the Magento web user.
- Create .sql.gz of the database
php bin/magento setup:backup --db
This will create a db backup in the "var/backups" directory - You will then need to compress this backup
gzip path/to/backup
for examplegzip var/backups/1634286600_db.sql
3. Installing the MDOQ CLI (optional)
The easiest way to send backups to MDOQ is to use MDOQ CLI, instructions on installation and configuration can be found here
4. Pushing backups to MDOQ (optional)
To push backups using the MDOQ CLI you will need to know the ID of your production instance.
Pushing the code backup
mdoq backups:push --instance-id=INSTANCE_ID --backup-type=code-backup --file=/path/to/backup.tgz
Pushing the db backup
mdoq backups:push --instance-id=INSTANCE_ID --backup-type=full-db-backup --file=/path/to/backup.sql.gz
Once both these have pushed you can verify they are in MDOQ by:
- selecting your production instance
- clicking "toolbelt" > "snapshots"
- Then clicking "manage" on each backup type to validate the backups are there.
5. Configuring Source Control
If you don't have source control or your source control provider isn't in the list below please get in touch.
6. Service Configuration
To ensure MDOQ provisions the correct infrastructure for you site we need to configure the correct service versions of your site.
If your site is running somewhere, please obtain a list of all service versions you are using. If your site isn't running anywhere please pick services version appropriate to the version of Magento you are running, they can be found here.
Once you have this list
- Log into MDOQ
- Select your production instance
- Select "Settings"
- Change the versions for each service as appropriate
- click save
7. Roll up site
- Log into MDOQ
- Select your production instance
- Select "Sync"
- Click "Show More"
- Check every box
- Click "Proceed"
8. Post Install Checklist
At this point the production site should be up and running.
There are a few common tasks and question that you may wish to carryout / ask.
Please see the Post Install Checklist
Final Migration
Once you're happy with your new Production site, please see the going live with your new production site guide.