getBackupStatus#
- swordfish.function.getBackupStatus()#
Get the status of backup/restore tasks.
- Parameters:
userName (Constant) – A string indicating the user name.
- Returns:
A table where each row represents the information of a task.
userName: user name
type: backup/restore types.
BACKUP_BY_SQL/RESTORE_BY_SQL: backup/restore by SQL statement
BACKUP_BY_COPY_FILE/RESTORE_BY_COPY_FILE: backup/restore by copying files
startTime: when the task starts
dbName: database path
tableName: table name
totalPartitions: the number of partitions to be backed up/restored
completedPartitions: the number of partitions have been backed up/restored
percentComplete: the completion percentage
endTime: return the end time of a task if it has ended, otherwise return the estimated completion time
completed: whether the task is completed. Return 1 if it is completed, otherwise 0.
Note
The number of tasks generated for a backup statement is the same as the number of the backup partitions.
Administrators can check the tasks submitted by all users, or the tasks submitted by a specified user by specifying a userName.
When a non-administrator executes the function, return the status of backup/restore tasks submitted by the current user.
- Return type: