12-15-2020 03:16 AM
Hello,
we are saving snapshots on the APIC controller. Is there any build-in mechanism which ca be used to delete these snapshots automatically after a few days?
Thanks
Udo
Solved! Go to Solution.
12-15-2020 05:05 AM
Udo,
The APIC will retain the most recent 50 snapshots locally then overwrite the oldest. Snapshots are extremely small xml files (typically less than 100KB). If storage is the concern, don't worry. I'd just allow them to auto-overwrite if you don't need them beyond a few days. Alternately if you really wanted to clean them up you could setup an external cron job/script to delete snapshots older than <date> using the API.
Robert
12-15-2020 05:05 AM
Udo,
The APIC will retain the most recent 50 snapshots locally then overwrite the oldest. Snapshots are extremely small xml files (typically less than 100KB). If storage is the concern, don't worry. I'd just allow them to auto-overwrite if you don't need them beyond a few days. Alternately if you really wanted to clean them up you could setup an external cron job/script to delete snapshots older than <date> using the API.
Robert
12-15-2020 05:10 AM
thank you! I didn't found this information about the retention time. Did you habe a link to a Cisco document?
Regarding the size you are right. I notice the files are really small.
I think if the files are automatically overwritten from my perspective it isn't necessary to activate a cron job and do this with the REST API. But it's a good hint. So it depends on our customer requirement and policy.
Thanks and have a nice day
Udo
12-15-2020 05:59 AM
I couldn't find this documented either. I'll get our docs team to address this. Though this property (maxSnapshotCount) is not exposed to users, we should still detail the limits.
You can see which limits are applied to your backup Export Policies by looking at the configExportP objects on your APIC. The "Config Rollback" feature is really just an extension of the Config Export Policies, so they abide by the same properties including the max global snapshot values.
apic1# moquery -c configExportP | egrep 'dn|maxSnapshotCount'
dn : uni/fabric/configexp-DailyAutoBackup
maxSnapshotCount : 3
dn : uni/fabric/configexp-WeeklyBackup
maxSnapshotCount : global-limit
dn : uni/fabric/configexp-myExportPolicy
maxSnapshotCount : global-limit
dn : uni/fabric/configexp-ATX-Upgrade
maxSnapshotCount : global-limit
dn : uni/fabric/configexp-defaultOneTime
maxSnapshotCount : global-limit
dn : uni/fabric/configexp-defaultAuto
maxSnapshotCount : global-limit
apic1#
Regards,
Robert
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