cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
761
Views
1
Helpful
3
Replies

APIC - Snapshot with custom name

ju.mahieu
Level 1
Level 1

Hi ACI experts,

I'm trying to find out the CLI commands to snapshot APIC config through CLI with a custom name.

(Ex : Save_@IP_APIC_-<yyyy-mm-dd>T<hh-mm-ss>.tar.gz)

Any ideas ?

Thank you

 

 

1 Accepted Solution

Accepted Solutions

disales
Cisco Employee
Cisco Employee

Hello there @ju.mahieu,

I've tried it on a lab and was not able to do it via CLI, however i was able to do it via API / GUI, to do it in a reoccurring way you will need two steps:
1. You need to create a new Snapshot management policy

via GUI
go to ADMIN > Import/Export > then right click on Snapshot Management, and select Create Configuration Snapshot Management Policy

or via API
Method:POST
url: https://{{Your_APIC_IP}}/api/node/mo/uni/fabric/snpmgr-{{YourSnapPolicyNAME}}.json
payload{"configSnapshotMgrP":{"attributes":{"dn":"uni/fabric/snpmgr-{{YourSnapPolicyNAME}}","name":"{{YourSnapPolicyNAME}}":"download","fileName":"{{NameOfYourFile.tar.gz}}","rn":"snpmgr-{{YourSnapPolicyNAME}}","status":"created"},"children":[{"configRsRemotePath":{"attributes":{"tnFileRemotePathName":"{{YourRemoteLocationsPreviously created}}","status":"created,modified"},"children":[]}}]}}

2. Every time you want a new snapshot this policy has to be triggered and it can be done again via GUI or via API (my suggestion is to trigger it via API as you can automate it).

via GUI
Inside of your Snapshot Management Policy, on the Policy tab, on the option "Start Now:" select "YES", then click submit on the bottom right side.

 

via API
Method:POST
url: https://{{Your_APIC_IP}}/api/node/mo/uni/fabric/snpmgr-{{YourSnapPolicyNAME}}.json
payload{"configSnapshotMgrP":{"attributes":{"dn":"uni/fabric/snpmgr-{{YourSnapPolicyNAME}},"adminSt":"triggered"},"children":[]}}



If you find my reply solved your question or issue, kindly click the 'Accept as Solution' button and vote it as helpful.

You can also learn more about Cisco ACI through our live Ask the Experts (ATXs) session. Check out the ATXs Resources [https://community.cisco.com/t5/data-center-and-cloud-knowledge/cisco-aci-ask-the-experts-resources/ta-p/4394491] to view the latest schedule for upcoming sessions, as well as the useful references, e.g. online guides, FAQs.

View solution in original post

3 Replies 3

disales
Cisco Employee
Cisco Employee

Hello there @ju.mahieu,

I've tried it on a lab and was not able to do it via CLI, however i was able to do it via API / GUI, to do it in a reoccurring way you will need two steps:
1. You need to create a new Snapshot management policy

via GUI
go to ADMIN > Import/Export > then right click on Snapshot Management, and select Create Configuration Snapshot Management Policy

or via API
Method:POST
url: https://{{Your_APIC_IP}}/api/node/mo/uni/fabric/snpmgr-{{YourSnapPolicyNAME}}.json
payload{"configSnapshotMgrP":{"attributes":{"dn":"uni/fabric/snpmgr-{{YourSnapPolicyNAME}}","name":"{{YourSnapPolicyNAME}}":"download","fileName":"{{NameOfYourFile.tar.gz}}","rn":"snpmgr-{{YourSnapPolicyNAME}}","status":"created"},"children":[{"configRsRemotePath":{"attributes":{"tnFileRemotePathName":"{{YourRemoteLocationsPreviously created}}","status":"created,modified"},"children":[]}}]}}

2. Every time you want a new snapshot this policy has to be triggered and it can be done again via GUI or via API (my suggestion is to trigger it via API as you can automate it).

via GUI
Inside of your Snapshot Management Policy, on the Policy tab, on the option "Start Now:" select "YES", then click submit on the bottom right side.

 

via API
Method:POST
url: https://{{Your_APIC_IP}}/api/node/mo/uni/fabric/snpmgr-{{YourSnapPolicyNAME}}.json
payload{"configSnapshotMgrP":{"attributes":{"dn":"uni/fabric/snpmgr-{{YourSnapPolicyNAME}},"adminSt":"triggered"},"children":[]}}



If you find my reply solved your question or issue, kindly click the 'Accept as Solution' button and vote it as helpful.

You can also learn more about Cisco ACI through our live Ask the Experts (ATXs) session. Check out the ATXs Resources [https://community.cisco.com/t5/data-center-and-cloud-knowledge/cisco-aci-ask-the-experts-resources/ta-p/4394491] to view the latest schedule for upcoming sessions, as well as the useful references, e.g. online guides, FAQs.

ju.mahieu
Level 1
Level 1

Thank you guys for your help

Save 25% on Day-2 Operations Add-On License