Preparation
Step 0: Install the necessary tools
Install the Aptible CLI and the MongoDB shell,mongo
.
Step 1: Configuration
Collect information on the Database you’d like to upgrade and store it in the following environment variables for use later in the guide:-
DB_HANDLE
- The handle (i.e. name) of the Database. -
ENVIRONMENT
- The handle of the environment the Database belongs to. -
VERSION
- The desired MongoDB version. Runaptible db:versions
to see a full list of options.
Step 2: Contact Aptible Support
An Aptible team member must update the Database’s metadata to the new version in order to upgrade the Database. When contacting Aptible Support please adhere to the following rules to ensure a smooth upgrade process:- Ensure that you have Administrator Access to the Database’s Environment. If you do not, please have someone with access contact support or CC an Account Owner or Deploy Owner for approval.
- Use the same email address that’s associated with your Aptible user account to contact support.
- Include the configuration values above. You may run the following command to generate a request with the required information:
Execution
Step 1: Restart the Database
Once support has updated the Database, restarting it will apply the change. You may do so at your convenience with theaptible db:reload
CLI command:
Step 2: Tunnel into the Database
In a separate terminal, create a Database Tunnel to the Database using the Aptible CLI.aptible db:tunnel
, and store it in the DB_URL
environment variable in the original terminal.
Example:
Step 3: Enable Backward-Incompatible Features
Run thesetFeatureCompatibilityVersion
admin command on the Database: