MySQL HeatWave on AWS  /  ...  /  Importing Data Using the Dump Loading Utility Importing Data Using the Dump Loading Utility

Use the dump loading utility of MySQL Shell to load a dump from an Amazon S3 bucket to a DB System in MySQL HeatWave on AWS.

This task requires the following:

  • MySQL Shell 8.0.27, or higher. Exports created by MySQL Shell 8.0.27, or higher, cannot be imported by earlier versions of MySQL Shell.
  • Data exported from a source MySQL Server following the instructions described in Exporting Data Using MySQL Shell.
  • Enough storage space on your DB System for the data you intend to import. To check DB System storage space, see Viewing DB System Details.
  • You have run the loadDump() command in dryrun mode to check that there are no issues when the dump files are loaded from an Amazon S3 bucket into the connected DB System:
    util.loadDump("<Schema>", {s3bucketName: "<BucketName>", dryRun: true, ocimds: true})

    This performs a test run of the import checking for compatibility issues. The compatibility issues and remediation steps are listed in the output. See MySQL Shell Instance and Schema Dump Utilities.

Do the following to import data using the dump loading utility:

  1. Start a MySQL Shell session and connect to the DB System:
    mysqlsh <Username>@<HostNameOfMySQLDBSystem>

    See Connecting with MySQL Shell.

  2. Import data using the dump loading utility:
    util.loadDump("<Prefix>",{s3BucketName: "<BucketName>", threads: <ThreadSize>})
    • <Prefix>: (Optional) Adds a prefix to the files uploaded to the bucket. If you specify this option, the files are uploaded to the defined bucket with the prefix in the following format: <BucketPrefix>/filename, similarly to a file path. For example, if <BucketPrefix> is set to test, every file uploaded to the defined bucket, <BucketName>, is done so as test/<filename>. If you download the file, the prefix is treated as a folder in the download. For local exports, this parameter is the path to the local directory you want to export to.
    • <BucketName>: The an Amazon S3 bucket from which the dump is to be loaded.
    • <ThreadSize>: The number of processing threads to use for this task. The default is 4. For best performance, it is recommended to set this parameter to twice the number of CPUs used by the target DB System.