mysqldump
to test the table definitions of an existing Database against another Database version in order to see if it’s compatible with the desired version. The primary reason to do this is to ensure a Database is compatible with a higher version before upgrading without waiting for lengthy data-loading operations.
mysqldump
and mysql
client tools.
SOURCE_HANDLE
- The handle (i.e. name) of the Database.
SOURCE_ENVIRONMENT
- The handle of the environment the Database belongs to.
TARGET_HANDLE
- The handle (i.e., name) for the Database.
TARGET_VERSION
- The target MySQL version. Run aptible db:versions
to see a full list of options. This must be within one General Availability version of the source Database.
TARGET_ENVIRONMENT
- The handle of the Environment to create the Database in.
aptible db:create
creates a Database with 1 GB of memory and 10 GB of disk space. This is typically sufficient for testing table definition compatibility, but if more memory or disk is required, the --container-size
and --disk-size
arguments can be used.
aptible db:tunnel
. Then dump the database and database object definitions into a file. defs.sql
in this case.
mysqldump 8
. You can disable this flag and resolve the error by adding --column-statistics=0
to the above command.
You now have a copy of your Database’s database object definitions in defs.sql
! The Database Tunnel can be closed by following the instructions that aptible db:tunnel
printed when the tunnel started.
$TARGET_ENVIRONMENT
is configured to retain final Database Backups, which is enabled by default, you may want to delete the final backups for all target Databases you created for this test.
You can obtain a list of final backups by running the following:
aptible backup:purge
command.