cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1301
Views
2
Helpful
3
Replies

Backing UP ACI Configuration

Rem Markov
Level 1
Level 1

Hey everybody!

So I'm intrested to make backups for our ACI configuration, and I have found that there is an option for DailyAutoBackup.

What I can't figure out is, Where is it saved, and how can I make it save up to a week of configuration rather then 3 each day. I want to have 2 snapshots each day for a week or a month until it removes it.

 

Now it the Snapshot is the equivalent of saving the Configuration of the ACI? if not, is there a way to do it ?

1 Accepted Solution

Accepted Solutions

Hi @Rem Markov ,

OK. So you question is

How do I change the maximum number of Snapshots for a Configuration Export Policy?

And you seem to have to have the idea that it is set to 3 snapshots.

In fact, you'll get "global-limit" number of snapshots rather than 3 snapshots unless you tweak the maxSnapshotCount attribute of your Configuration Export Policy (or ConfigExportP object).

And I can't find out what the "global-limit" number of snapshots is - but I can see NDI has created 24 snapshots on one of our Labs, so that's more than the 21 you need.

However - that does not get them removed after one week, to do that you'll need to set the maxSnapshotCount attribute of your Configuration Export Policy (or ConfigExportP object) to 21 - small problem there, you can't do that via the GUI. [or any other way

So let's say you've created a scheduler called Every12Hrs_Scheduler with two recurring schedule windows - 06:00 and 18:00

RedNectar_0-1691474620096.png

Now, in theory, you SHOULD be able to POST the following to create an Export Policy that keeps 21 backups rather than "global-limit" number of backups.

{
    "totalCount": "1",
    "imdata": [
        {
            "configExportP": {
                "attributes": {
                    "adminSt": "untriggered",
                    "descr": "",
                    "dn": "uni/fabric/configexp-Every12Hrs_ExpPol",
                    "format": "json",
                    "includeSecureFields": "yes",
                    "maxSnapshotCount": "21",
                    "name": "Every12Hrs_ExpPol",
                    "snapshot": "yes"
                },
                "children": [
                    {
                        "configRsExportScheduler": {
                            "attributes": {
                                "tnTrigSchedPName": "Every12Hrs_Scheduler"
                            }
                        }
                    }
                ]
            }
        }
    ]
}

However, when you try this:

RedNectar_2-1691475613030.png

Whoopsie!

So it would seem that "global-limit" is < 21 

SO - let's hit the online documentation: (via https://YourAPIC.IP/model-doc/#/objects/configExportP/properties )

RedNectar_4-1691475840653.png

OH DARN - there's proof that the maximum value you can push into there is 10 anyway. (I was able to successfully post the above with a value of 10 for maxSnapshotCount but could NOT post it when I incremented to 11)

So you are out of luck with trying to put 21 there!

So my advice is to just create your Schedular for every 12 hrs and create a Configuration Export Policy that uses it and be happy with whatever the max number of backups it keeps is!


Rambling footnote:

If you navigate to Admin > Import/Export >> Export Policies > Configuration > DailyAutoBackup >+ Open in Object Browser, you'll see that the  maxSnapshotCount has been set to 3 for that policy - which is why you see only 3 daily backups.  And from there, if you click the Open docs for the class icon, you'll see (after clicking the Properties tab, then the maxSnapshotCount attribute) the screendump I pasted above

RedNectar_5-1691476527617.png

 

 

RedNectar aka Chris Welsh.
Forum Tips: 1. Paste images inline - don't attach. 2. Always mark helpful and correct answers, it helps others find what they need.

View solution in original post

3 Replies 3

RedNectar
VIP
VIP

Hi @Rem Markov ,

So I'm intrested to make backups for our ACI configuration, and I have found that there is an option for DailyAutoBackup.

What I can't figure out is, Where is it saved,

It is saved locally on the APIC's SSD.  I can't remember exactly where, but even if I could that information probably wouldn't be useful because you'd (probably) need root access to see it.

and how can I make it save up to a week of configuration rather then 3 each day.

  1. Create your own schedule. Admin > Schedulers >> Fabric >+ Create Scheduler
    RedNectar_0-1691357931959.png

     

  2. Create a Configuration Export PolicyAdmin > Import/Export >> Export Policies > Configuration >+ Create Configuration Export Policy (using the Scheduler you just created)
    RedNectar_1-1691358173600.png

     

I want to have 2 snapshots each day for a week or a month until it removes it.

Hold on - earlier you said you wanted a week's backup. Make up your mind. Rewind to step1 above and make it a 12 hourly schedule

Now it the Snapshot is the equivalent of saving the Configuration of the ACI?

Yes

if not, is there a way to do it ?

You can also set up external locations if you want the snapshots kept off the APIC

RedNectar aka Chris Welsh.
Forum Tips: 1. Paste images inline - don't attach. 2. Always mark helpful and correct answers, it helps others find what they need.

Thanks for the replay!

I think I wasn't very clear about what I'm asking,

As I see it, it looks like its saves up to 3 snapshots. I want to change the schedulers so it will take a snapshot each 12 hours, and it will be saved for a week.

Meaning that if I saved a snapshot on the sunday, it will be saved until next sunday.
And if I need root access to connect to the Snapshot what is it good to me? I want to be able to access it 

Hi @Rem Markov ,

OK. So you question is

How do I change the maximum number of Snapshots for a Configuration Export Policy?

And you seem to have to have the idea that it is set to 3 snapshots.

In fact, you'll get "global-limit" number of snapshots rather than 3 snapshots unless you tweak the maxSnapshotCount attribute of your Configuration Export Policy (or ConfigExportP object).

And I can't find out what the "global-limit" number of snapshots is - but I can see NDI has created 24 snapshots on one of our Labs, so that's more than the 21 you need.

However - that does not get them removed after one week, to do that you'll need to set the maxSnapshotCount attribute of your Configuration Export Policy (or ConfigExportP object) to 21 - small problem there, you can't do that via the GUI. [or any other way

So let's say you've created a scheduler called Every12Hrs_Scheduler with two recurring schedule windows - 06:00 and 18:00

RedNectar_0-1691474620096.png

Now, in theory, you SHOULD be able to POST the following to create an Export Policy that keeps 21 backups rather than "global-limit" number of backups.

{
    "totalCount": "1",
    "imdata": [
        {
            "configExportP": {
                "attributes": {
                    "adminSt": "untriggered",
                    "descr": "",
                    "dn": "uni/fabric/configexp-Every12Hrs_ExpPol",
                    "format": "json",
                    "includeSecureFields": "yes",
                    "maxSnapshotCount": "21",
                    "name": "Every12Hrs_ExpPol",
                    "snapshot": "yes"
                },
                "children": [
                    {
                        "configRsExportScheduler": {
                            "attributes": {
                                "tnTrigSchedPName": "Every12Hrs_Scheduler"
                            }
                        }
                    }
                ]
            }
        }
    ]
}

However, when you try this:

RedNectar_2-1691475613030.png

Whoopsie!

So it would seem that "global-limit" is < 21 

SO - let's hit the online documentation: (via https://YourAPIC.IP/model-doc/#/objects/configExportP/properties )

RedNectar_4-1691475840653.png

OH DARN - there's proof that the maximum value you can push into there is 10 anyway. (I was able to successfully post the above with a value of 10 for maxSnapshotCount but could NOT post it when I incremented to 11)

So you are out of luck with trying to put 21 there!

So my advice is to just create your Schedular for every 12 hrs and create a Configuration Export Policy that uses it and be happy with whatever the max number of backups it keeps is!


Rambling footnote:

If you navigate to Admin > Import/Export >> Export Policies > Configuration > DailyAutoBackup >+ Open in Object Browser, you'll see that the  maxSnapshotCount has been set to 3 for that policy - which is why you see only 3 daily backups.  And from there, if you click the Open docs for the class icon, you'll see (after clicking the Properties tab, then the maxSnapshotCount attribute) the screendump I pasted above

RedNectar_5-1691476527617.png

 

 

RedNectar aka Chris Welsh.
Forum Tips: 1. Paste images inline - don't attach. 2. Always mark helpful and correct answers, it helps others find what they need.

Review Cisco Networking for a $25 gift card

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