Avamar: How to reset the data movement app-managed policy using REST api
Summary: This article explains how to reset the data movement "app-managed" policy on Avamar with DDOS 6.0 using the DDOS REST API.
Instructions
How to reset data movement app-managed policy on Avamar with DDOS 6.0 using REST api:
-
Avamar 7.4.1-58
-
Data Domain: 6.0
Issue:
The Cloud Tier feature was enabled on Avamar. After encountering an issue, the Cloud Tier feature is not turned on in the Avamar UI for that Data Domain (DD), however on the DD side it shows that the mtree has an app-managed policy.
Example:
data-movement policy show
Mtree Target(Tier/Unit Name) Policy Value
------------------------------- ---------------------- ------------- -------
/data/col1/avamar-1234567891 Cloud/cloudunit1 app-managed enabled
The Management Console Server (MCS) cannot now enable the Cloud Tier.
Error seen in the MCS:
WARNING: com.avamar.asn.service.ServiceException: Failed with HTTP error code : 400 additional information : {"details": "**** Data Movement Policy exists for the mtree.", "code": 5437}
Resolution:
The DDOS REST API must be used to reset the data-movement policy, as the reset feature is only available using the REST API in DDOS 6.0.
The DDOS REST API can be used to delete the existing policy, and then reenable the cloud tier.
Some examples are provided below to call the DD REST api:
host=[your dd host]
ddr_username=[your username]
ddr_password=[your password]
token=`curl --insecure -H "Content-Type: application/json" -X POST -d "{\"auth_info\":{\"username\":\"$ddr_username\",\"password\":\"$ddr_password\"}}" -w '\n' -i -s https://$host:3009/rest/v1.0/auth |grep 'X-DD-AUTH-TOKEN:'`
echo $token
#### List data movement policies:
curl --insecure -X GET --header 'Content-Type: application/json' --header 'Accept: application/json' --header "$token" -w '\n' "https://$host:3009/rest/v1.0/dd-systems/0/data-movement-policies"
#### Set the id before delete:
#### Here the id is one of the above listed data movements: Find the id by the mtree_name.
id="" [root@localhost text]
curl --insecure -X DELETE --header 'Content-Type: application/json' --header 'Accept: application/json' --header "$token" -w '\n' https://$host:3009/rest/v1.0/dd-systems/0/data-movement-policies/$id
Additional Information
The "Enable Cloud Tier" option in the MCS UI:
