accessControl

completeBackup

Description

Flags a backup, previously initiated with the createBackup action, as complete. This action is a crucial step in the server's backup workflow, ensuring that the backup set is properly finalized and recognized by the system. This action is typically the final step in a backup transaction. Executing this action requires administrator privileges.

proc cas; accessControl.completeBackup; run;

Examples

After initiating a backup with the `createBackup` action within a transaction, this action finalizes the backup process.

SAS® / CAS Code Code awaiting community validation
Copied!
1PROC CAS;
2 ACCESSCONTROL.completeBackup;
3RUN;
Result :
The action completes successfully. The server logs will indicate that the backup has been flagged as complete. No result table is returned by this action.

This example demonstrates a complete administrative workflow. First, it assumes the Superuser role. Then, it starts a transaction, creates a backup of the access controls in the 'casuser' caslib, and finally, completes the backup before committing the transaction.

SAS® / CAS Code Code awaiting community validation
Copied!
1PROC CAS;
2 ACCESSCONTROL.assumeRole / adminRole='superuser'; RUN;
3 ACCESSCONTROL.startTransaction RESULT=r_start;
4 PRINT r_start;
5 ACCESSCONTROL.createBackup / caslib='casuser' name='myAcsBackup' transactionId=r_start.transId; RUN;
6 ACCESSCONTROL.completeBackup; RUN;
7 ACCESSCONTROL.commitTransaction / transactionId=r_start.transId; RUN;
8RUN;
Result :
The server successfully creates a backup named 'myAcsBackup' in the 'casuser' caslib and flags it as complete. The transaction is then committed, finalizing the state. The log will show the successful execution of each step.

FAQ

What is the primary purpose of the `completeBackup` action in SAS Viya?
Which action set includes the `completeBackup` action?
What is the basic CASL syntax for executing the `completeBackup` action?
Does the `completeBackup` action require any specific parameters to be passed?