This section provides information about the functions provided in the MGM API for starting and stopping NDB Cluster backups.
- Description
This function is used to initiate a backup of an NDB Cluster.
- Signature
int ndb_mgm_start_backup ( NdbMgmHandle handle, int wait, unsigned int* id, struct ndb_mgm_reply* reply )- Parameters
-
This function requires the four parameters listed here:
A management server
handle(anNdbMgmHandle).-
A
waitflag, with the following possible values:0: Do not wait for confirmation of the backup.1: Wait for the backup to be started.2: Wait for the backup to be completed.
-
Create the backup having backup ID
id. (This is also the function's return value.)No backup
idis returned ifwaitis set equal to 0. A pointer to an
ndb_mgm_replystructure to accommodate areply.
- Return value
On success, the backup ID (
id). In the event of failure, the function returns-1.
- Description
This function is used to initiate a backup of an NDB Cluster. It is the same as
ndb_mgm_start_backup(), except that it additionally specifies a value to be used for the next backup taken.- Signature
int ndb_mgm_start_backup ( NdbMgmHandle handle, int wait, unsigned int* id, struct ndb_mgm_reply* reply, unsigned int nextBackupId )- Parameters
-
This function requires the five parameters listed here:
A management server
handle(anNdbMgmHandle).-
A
waitflag, with the following possible values:0: Do not wait for confirmation of the backup.1: Wait for the backup to be started.2: Wait for the backup to be completed.
-
Create the backup having backup ID
id. (This is also the function's return value.)No backup
idis returned ifwaitis set equal to 0. A pointer to an
ndb_mgm_replystructure to accommodate areply.The ID of the next backup taken is set to the value of
.nextBackupID+ 1
- Return value
On success, the backup ID passed as
id. Otherwise, the function returns-1.
- Description
This function is used to initiate a backup of an NDB Cluster. It is the same as
ndb_mgm_start_backup2(), but adds an argument for specifying whether the the state of the backup matches that of the cluster when the backup is started, or when it is completed.- Signature
int ndb_mgm_start_backup ( NdbMgmHandle handle, int wait, unsigned int* id, struct ndb_mgm_reply* reply, unsigned int nextBackupId, unsigned int backupPoint )- Parameters
-
This function requires the six parameters listed here:
A management server
handle(anNdbMgmHandle).-
A
waitflag, with the following possible values:0: Do not wait for confirmation of the backup.1: Wait for the backup to be started.2: Wait for the backup to be completed.
-
Create the backup having backup ID
id. (This is also the function's return value.)No backup
idis returned ifwaitis set equal to 0. A pointer to an
ndb_mgm_replystructure to accommodate areply.The ID of the next backup taken is set to the value of
.nextBackupID+ 1backupPointis 1 if the state of the backup should reflect that of the cluster the time when the backup is started, or 0 if its state should reflect that of the cluster when the backup is complete. Using 1 is equivalent to invoking the ndb_mgm clientSTART BACKUPcommand withSNAPSHOTSTART; 0 is equivalent to invoking the command withSNAPSHOTEND.
- Return value
On success, the backup ID passed as
id. Otherwise, the function returns-1.
- Description
-
This function is used to initiate a backup of an NDB Cluster. It is the same as
ndb_mgm_start_backup3(), except that it produces an encrypted backup using the password provided of the length specified.This function was added in NDB 8.0.22.
- Signature
int ndb_mgm_start_backup ( NdbMgmHandle handle, int wait, unsigned int* id, struct ndb_mgm_reply* reply, unsigned int nextBackupId, unsigned int backupPoint, const char* password, unsigned int password_length )- Parameters
-
This function requires the eight parameters listed here:
A management server
handle(anNdbMgmHandle).-
A
waitflag, with the following possible values:0: Do not wait for confirmation of the backup.1: Wait for the backup to be started.2: Wait for the backup to be completed.
-
Create the backup having backup ID
id. (This is also the function's return value.)No backup
idis returned ifwaitis set equal to 0. A pointer to an
ndb_mgm_replystructure to accommodate areply.The ID of the next backup taken is set to the value of
.nextBackupID+ 1backupPointis 1 if the state of the backup should reflect that of the cluster the time when the backup is started, or 0 if its state should reflect that of the cluster when the backup is complete. Using 1 is equivalent to invoking the ndb_mgm clientSTART BACKUPcommand withSNAPSHOTSTART; 0 is equivalent to invoking the command withSNAPSHOTEND.A password used to protect the encrypted backup. This is a string of up to 256 characters in length; any printable ASCII characters can be used in the password string with the exception of
!,',",$,%,\, and^.The length of the password.
It is possible to specify an empty password, but this is not recommended.
- Return value
On success, the backup ID passed as
id. Otherwise, the function returns-1.
- Description
This function is used to stop an NDB Cluster backup.
- Signature
int ndb_mgm_abort_backup ( NdbMgmHandle handle, unsigned int id, struct ndb_mgm_reply* reply)- Parameters
-
This function takes 3 parameters:
An
NdbMgmHandle.The
idof the backup to be aborted.A pointer to an
ndb_mgm_replystructure.
- Return value
In case of an error, this function returns
-1.