This topic describes how to initiate a data backup job after you initiate a log archive job.
Prerequisites
A log archive job has been initiated. You can initiate a data backup job only when
STATUSof the log archive job isDOING.For more information about how to enable log archiving, see Enable log archiving.
(Optional) Preparations
Before you initiate a data backup job, you can set a password for the backup set.
Log on to the
systenant of a cluster as therootuser.(Optional) Run the following command to set a backup password.
Note:
This password is the password of the backup set after the backup job is completed. When this parameter is set, you must enter this password to recover data by using this backup set. This password cannot be deleted.
obclient [(none)]> SET ENCRYPTION ON IDENTIFIED BY 'password' ONLY;For example:
obclient [(none)]> SET ENCRYPTION ON IDENTIFIED BY '******' ONLY;Note:
After you set a backup password, you can disconnect the session and reconnect to the database to cancel the setting before a data backup job is initiated.
Initiate a full data backup job
After you complete the preparations, you can perform the following steps to initiate a full data backup job.
Assume that the current cluster contains three tenants: sys, mysql_tenant, and oracle_tenant, and that backup preparations have been completed for the mysql_tenant and oracle_tenant tenants.
Initiate a full data backup job from the sys tenant
You can initiate a full data backup job for all tenants or a specified tenant in the cluster from the sys tenant.
Log on to the
systenant of a cluster as therootuser.Execute the following statement to initiate a full data backup job:
Initiate a full data backup job for all tenants in the cluster
You can initiate a full data backup job for all tenants in the cluster.
obclient [(none)]> ALTER SYSTEM BACKUP DATABASE;In this example, the system initiates a full data backup job for the
mysql_tenantandoracle_tenanttenants in the cluster.Initiate a full data backup job for a specified tenant in the cluster
You can initiate a full data backup job for a specified tenant without affecting other tenants in the cluster.
To initiate a full data backup job for the
mysql_tenanttenant, execute the following statement:obclient [(none)]> ALTER SYSTEM BACKUP TENANT = mysql_tenant;Note:
If you specify multiple tenants, separate the tenant names with commas (
,).After the statement is executed, the system initiates a full data backup job for the
mysql_tenanttenant.
You can view the backup progress in real time. For more information, see View the data backup progress.
Initiate a full data backup job for a user tenant
You can initiate a full data backup job for a user tenant without affecting other tenants.
Log on to the database as a tenant administrator.
In this example, you can log on to the
mysql_tenanttenant as therootuser, or to theoracle_tenanttenant as theSYSuser.Execute the following statement to initiate a full data backup job:
obclient [(none)]> ALTER SYSTEM BACKUP DATABASE;After the statement is executed, the system initiates a full data backup job for the current tenant.
You can view the backup progress in real time. For more information, see View the data backup progress.