This section describes util.loadBinlogs
. This
utility enables you to load a binary log dump from local or
cloud storage.
The utility's syntax is:
Press CTRL+C to copyutil.loadBinlogs(Url[, options])
Url
: A local file path or cloud storage. If
the location specified exists and contains a dump created by
this utility, the snapshot information in that dump is used as
the starting point for the binary log dump.
See Options.
The following must be true:
The directory must contain a dump created by
util.dumpBinlogs()
.The dump must be compatible with the current version of MySQL Shell.
The dump must be finished.
The snapshot information must be contiguous.
The current value of
gtid_executed
in the target instance must fully contain the value ofgtid_executed
of the first binary log file to be loaded (in chronological order of GTIDs), ignoring any extra transactions at the target
-
ignoreVersion
: (boolean) Load the dump even if version of the target instance is incompatible with the version of the source instance the binary logs were dumped from.Default value is false.
-
ignoreGtidGap
: (boolean) Load the dumps even if the current value ofgtid_executed
in the target instance does not fully contain the starting value ofgtid_executed
of the first binary log file to be loaded.Default value is false.
stopBefore
: (string) Stops the load before the specified binary log event is applied. Accepts a GTID in the following format:UUID
[:tag
]:transaction-id.stopAfter
: (string) Stops the load after the specified binary log event is applied. Accepts a GTID in the following format:
.UUID
[:tag
]:transaction-id-
dryRun
: (boolean) Prints information about what would be loaded, but does not load anything.Default value is false.
showProgress
: Display (true
) or hide (false
) progress information for the load. The default istrue
ifstdout
is a terminal (tty
), such as when MySQL Shell is in interactive mode, andfalse
otherwise.
-
osBucketName: "
string
" The name of the Oracle Cloud Infrastructure Object Storage bucket where the dump files are located. By default, the
[DEFAULT]
profile in the Oracle Cloud Infrastructure CLI configuration file located at~/.oci/config
is used to establish a connection to the bucket. You can substitute an alternative profile to be used for the connection with theociConfigFile
andociProfile
options. For instructions to set up a CLI configuration file, see SDK and CLI Configuration File.-
osNamespace: "
string
" The Oracle Cloud Infrastructure namespace where the Object Storage bucket named by
osBucketName
is located. The namespace for an Object Storage bucket is displayed in the Bucket Information tab of the bucket details page in the Oracle Cloud Infrastructure console, or can be obtained using the Oracle Cloud Infrastructure command line interface.-
ociConfigFile: "
string
" An Oracle Cloud Infrastructure CLI configuration file that contains the profile to use for the connection, instead of the one in the default location
~/.oci/config
.-
ociProfile: "
string
" The profile name of the Oracle Cloud Infrastructure profile to use for the connection, instead of the
[DEFAULT]
profile in the Oracle Cloud Infrastructure CLI configuration file used for the connection.-
ociAuth
: "string
" -
The authentication method to use when connecting to Oracle Cloud Infrastructure. This option requires
osBucketName
is configured with a valid value.The following options are available:
-
api_key
: OCI connections use the OCI configuration file. See Section 4.7.1, “Oracle Cloud Infrastructure Object Storage”.If
osBucketName
is defined with a valid value, butociAuth
is not defined,api_key
is the default value used. -
instance_principal
: OCI connections use instance principal authentication. See Instance Principal Authentication.This option can not be used if
ociConfigFile
orociProfile
are defined. -
resource_principal
: OCI connections use resource principal authentication. See Resource Principal Authentication.This option can not be used if
ociConfigFile
orociProfile
are defined. security_token
: OCI connections use a temporary, generated session token. See Session Token-Based Authentication.
-
MySQL Shell supports loading dumps stored in S3-compatible buckets, such as Amazon Web Services (AWS) S3.
MySQL Shell supports AWS S3 configuration in command line options, environment variables, and configuration files. Command line options override environment variables, configuration files, and default options.
For information on configuration requirements, see Section 4.7, “Cloud Service Configuration”.
-
s3BucketName: "
string
" The name of the S3 bucket where the dump files are located. By default, the
default
profile in the Amazon Web Services (AWS) CLIconfig
andcredentials
files located at~/.aws/
are used to establish a connection to the S3 bucket. You can substitute alternative configurations and credentials for the connection with thes3ConfigFile
ands3CredentialsFile
options. For instructions on installing and configuring the AWS CLI, see Getting started with the AWS CLI.-
s3CredentialsFile: "
string
" A credentials file that contains the user's credentials to use for the connection, instead of the one in the default location,
~/.aws/credentials
. Typically, the credentials file contains theaws_access_key_id
andaws_secret_access_key
to use for the connection.-
s3ConfigFile: "
string
" An AWS CLI configuration file that contains the profile to use for the connection, instead of the one in the default location
~/.aws/config
. Typically, the config file contains the region and output type to use for the connection.-
s3Profile: "
string
" The profile name of the s3 CLI profile to use for the connection, instead of the
default
profile in the AWS CLI configuration file used for the connection.-
s3Region: "
string
" The name of the region to use for the connection.
-
s3EndpointOverride: "
string
" -
The URL of the endpoint to use instead of the default.
When connecting to the Oracle Cloud Infrastructure S3 compatibility API, the endpoint takes the following format:
https://
. Replacenamespace
.compat.objectstorage.region
.oraclecloud.comnamespace
with the Object Storage namespace andregion
with your region identifier. For example, the region identifier for the US East (Ashburn) region isus-ashburn-1
.For a namespace named axaxnpcrorw5 in the US East (Ashburn) region:
https://axaxnpcrorw5.compat.objectstorage.us-ashburn-1.oraclecloud.com
.
MySQL Shell supports loading from Microsoft Azure Blob Storage.
MySQL Shell supports Microsoft Azure Blob Storage configuration in command line options, environment variables, and configuration files. Command line options override environment variables, and configuration files.
For information on configuration requirements and the order of precedence of the configuration types, see Section 4.7, “Cloud Service Configuration”.
-
azureContainerName: "
string
" Mandatory. The name of the Azure container from which the dump is to be loaded. The container must exist.
-
azureConfigFile: "
string
" -
Optional. A configuration file that contains the storage connection parameters, instead of the one in the default location, such as
~/.azure/config
. If this is not defined, the default configuration file is used.azureContainerName
must be defined, and not be empty. -
azureStorageAccount: "
string
" Optional. The name of the Azure storage account to use for the operation.
-
azureStorageSasToken: "
string
" Optional. Azure Shared Access Signature (SAS) token to be used for the authentication of the operation, instead of a key.