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?

Associated Scenarios

Use Case
Standard Security Audit Trail Finalization

A financial institution requires a snapshot of all access controls before applying a major security patch. The security team needs to ensure the backup of the 'Reference' caslib...

Use Case
Workflow Validation in Multi-Step Migration

During a system migration, the IT Operations team automates the backup of user permissions. Although the action does not process large data volumes itself, this test simulates a...

Use Case
Invalid Workflow Order (Missing Transaction)

A DevOps engineer is debugging a new deployment script. The script accidentally attempts to flag a backup as 'complete' without having initiated a transaction or a 'createBackup...