08-06-2023 02:55 AM
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 ?
Solved! Go to Solution.
08-07-2023 11:29 PM - edited 08-07-2023 11:39 PM
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
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:
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 )
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
08-06-2023 02:46 PM
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.
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
08-07-2023 03:01 AM
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
08-07-2023 11:29 PM - edited 08-07-2023 11:39 PM
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
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:
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 )
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide