cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
Choose one of the topics below for Cisco DNA Center Resources to help you on your journey with Cisco DNA Center

This community is for technical, feature, configuration and deployment questions.
For production deployment issues, please contact the TAC!
We will not comment or assist with your TAC case in these forums.

612
Views
0
Helpful
1
Replies
Highlighted
Beginner

DNA Backup houskeeping

Hi,

Our DNA backups are scheduled daily.

Analytics (NFS based) backup seem to be incremental, but automation data (SFTP based) backup are not. Those backups add 15GB to our server every day… How can I keep control of the used space?   

 

I could create a script to delete backups on the server, but what do I have to delete? Backup seem to be divided over 8 folders? And would DNA sync to that removal? 

Or can I script something from DNA to delete old backups? (via API's?)  

 

Thank you!

 

Kristof

Everyone's tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Cisco Employee

Re: DNA Backup houskeeping

Hi Kristof, 

 

The current logic is that indeed we create multiple directories, but then in these directories we create dedicated folders for each backup (identified by backup-id, below I have three backups with IDs:438213ea-3d5e-4428-8602-2440136d8478, 1b9a37ab-6329-4037-84c1-fd8734cbf41b, 8b5ac05f-5e7b-43a5-a801-013ba7e0f6de):, e.g.:

 

 

$ find -maxdepth 2 -type d -ls
   392470      4 drwxrwxr-x   9 dnac     dnac         4096 Jan  8 09:00 .
   392533      4 drwxrwxr-x   5 dnac     dnac         4096 Jan  8 09:00 ./maglev-system.credentialmanager
  1570337      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  8 09:00 ./maglev-system.credentialmanager/438213ea-3d5e-4428-8602-2440136d8478
  1578782      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  7 22:46 ./maglev-system.credentialmanager/1b9a37ab-6329-4037-84c1-fd8734cbf41b
  1578801      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  7 23:30 ./maglev-system.credentialmanager/8b5ac05f-5e7b-43a5-a801-013ba7e0f6de
   392473      4 drwxrwxr-x   5 dnac     dnac         4096 Jan  8 09:00 ./app-hosting.postgres
   785642      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  8 09:00 ./app-hosting.postgres/438213ea-3d5e-4428-8602-2440136d8478
   790341      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  7 22:46 ./app-hosting.postgres/1b9a37ab-6329-4037-84c1-fd8734cbf41b
   790344      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  7 23:30 ./app-hosting.postgres/8b5ac05f-5e7b-43a5-a801-013ba7e0f6de
   392532      4 drwxrwxr-x   5 dnac     dnac         4096 Jan  8 09:00 ./maglev-system.glusterfs
  2095515      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  8 09:01 ./maglev-system.glusterfs/438213ea-3d5e-4428-8602-2440136d8478
  2095817      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  7 22:47 ./maglev-system.glusterfs/1b9a37ab-6329-4037-84c1-fd8734cbf41b
  2097485      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  7 23:31 ./maglev-system.glusterfs/8b5ac05f-5e7b-43a5-a801-013ba7e0f6de
   658620      4 drwxr-xr-x   2 dnac     dnac         4096 Jan  8 09:01 ./backup-metadata
   393413      4 drwxrwxr-x   5 dnac     dnac         4096 Jan  8 09:01 ./fusion.postgres
   393028      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  8 09:01 ./fusion.postgres/438213ea-3d5e-4428-8602-2440136d8478
   393422      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  7 22:47 ./fusion.postgres/1b9a37ab-6329-4037-84c1-fd8734cbf41b
   407472      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  7 23:31 ./fusion.postgres/8b5ac05f-5e7b-43a5-a801-013ba7e0f6de
   392531      4 drwxrwxr-x   5 dnac     dnac         4096 Jan  8 09:00 ./maglev-system.mongodb
   392534      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  8 09:01 ./maglev-system.mongodb/438213ea-3d5e-4428-8602-2440136d8478
   393419      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  7 22:47 ./maglev-system.mongodb/1b9a37ab-6329-4037-84c1-fd8734cbf41b
   393421      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  7 23:31 ./maglev-system.mongodb/8b5ac05f-5e7b-43a5-a801-013ba7e0f6de
   392471      4 drwxrwxr-x   5 dnac     dnac         4096 Jan  8 09:00 ./ndp.redis
  2095509      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  8 09:00 ./ndp.redis/438213ea-3d5e-4428-8602-2440136d8478
   658624      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  7 22:46 ./ndp.redis/1b9a37ab-6329-4037-84c1-fd8734cbf41b
   658638      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  7 23:30 ./ndp.redis/8b5ac05f-5e7b-43a5-a801-013ba7e0f6de

 

To check backup-id you need to hover over backup-name in UI. 

 

Currently there is no official API to handle backups but indeed you can handle it on the server side. 

 

By removing all folders + associated backup-metadata json file in directory ./backup-metadata via cmd:

 

rm -rf */1b9a37ab-6329-4037-84c1-fd8734cbf41b*

 

leading to:

 

$ find -maxdepth 2 -type d -ls
   392470      4 drwxrwxr-x   9 dnac     dnac         4096 Jan  8 09:00 .
   392533      4 drwxrwxr-x   4 dnac     dnac         4096 Jan  8 09:05 ./maglev-system.credentialmanager
  1570337      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  8 09:00 ./maglev-system.credentialmanager/438213ea-3d5e-4428-8602-2440136d8478
  1578801      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  7 23:30 ./maglev-system.credentialmanager/8b5ac05f-5e7b-43a5-a801-013ba7e0f6de
   392473      4 drwxrwxr-x   4 dnac     dnac         4096 Jan  8 09:05 ./app-hosting.postgres
   785642      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  8 09:00 ./app-hosting.postgres/438213ea-3d5e-4428-8602-2440136d8478
   790344      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  7 23:30 ./app-hosting.postgres/8b5ac05f-5e7b-43a5-a801-013ba7e0f6de
   392532      4 drwxrwxr-x   4 dnac     dnac         4096 Jan  8 09:05 ./maglev-system.glusterfs
  2095515      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  8 09:01 ./maglev-system.glusterfs/438213ea-3d5e-4428-8602-2440136d8478
  2097485      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  7 23:31 ./maglev-system.glusterfs/8b5ac05f-5e7b-43a5-a801-013ba7e0f6de
   658620      4 drwxr-xr-x   2 dnac     dnac         4096 Jan  8 09:05 ./backup-metadata
   393413      4 drwxrwxr-x   4 dnac     dnac         4096 Jan  8 09:05 ./fusion.postgres
   393028      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  8 09:01 ./fusion.postgres/438213ea-3d5e-4428-8602-2440136d8478
   407472      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  7 23:31 ./fusion.postgres/8b5ac05f-5e7b-43a5-a801-013ba7e0f6de
   392531      4 drwxrwxr-x   4 dnac     dnac         4096 Jan  8 09:05 ./maglev-system.mongodb
   392534      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  8 09:01 ./maglev-system.mongodb/438213ea-3d5e-4428-8602-2440136d8478
   393421      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  7 23:31 ./maglev-system.mongodb/8b5ac05f-5e7b-43a5-a801-013ba7e0f6de
   392471      4 drwxrwxr-x   4 dnac     dnac         4096 Jan  8 09:05 ./ndp.redis
  2095509      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  8 09:00 ./ndp.redis/438213ea-3d5e-4428-8602-2440136d8478
   658638      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  7 23:30 ./ndp.redis/8b5ac05f-5e7b-43a5-a801-013ba7e0f6de

 

 

all specific data should be removed and Cisco DNA-Center will get it reflected in UI (you might need to wait a bit and/or click refresh on backup screen). 

 

Hope it helps! Let me know if you have any further queries. 

 

Regards,
Mariusz

View solution in original post

1 REPLY 1
Highlighted
Cisco Employee

Re: DNA Backup houskeeping

Hi Kristof, 

 

The current logic is that indeed we create multiple directories, but then in these directories we create dedicated folders for each backup (identified by backup-id, below I have three backups with IDs:438213ea-3d5e-4428-8602-2440136d8478, 1b9a37ab-6329-4037-84c1-fd8734cbf41b, 8b5ac05f-5e7b-43a5-a801-013ba7e0f6de):, e.g.:

 

 

$ find -maxdepth 2 -type d -ls
   392470      4 drwxrwxr-x   9 dnac     dnac         4096 Jan  8 09:00 .
   392533      4 drwxrwxr-x   5 dnac     dnac         4096 Jan  8 09:00 ./maglev-system.credentialmanager
  1570337      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  8 09:00 ./maglev-system.credentialmanager/438213ea-3d5e-4428-8602-2440136d8478
  1578782      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  7 22:46 ./maglev-system.credentialmanager/1b9a37ab-6329-4037-84c1-fd8734cbf41b
  1578801      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  7 23:30 ./maglev-system.credentialmanager/8b5ac05f-5e7b-43a5-a801-013ba7e0f6de
   392473      4 drwxrwxr-x   5 dnac     dnac         4096 Jan  8 09:00 ./app-hosting.postgres
   785642      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  8 09:00 ./app-hosting.postgres/438213ea-3d5e-4428-8602-2440136d8478
   790341      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  7 22:46 ./app-hosting.postgres/1b9a37ab-6329-4037-84c1-fd8734cbf41b
   790344      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  7 23:30 ./app-hosting.postgres/8b5ac05f-5e7b-43a5-a801-013ba7e0f6de
   392532      4 drwxrwxr-x   5 dnac     dnac         4096 Jan  8 09:00 ./maglev-system.glusterfs
  2095515      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  8 09:01 ./maglev-system.glusterfs/438213ea-3d5e-4428-8602-2440136d8478
  2095817      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  7 22:47 ./maglev-system.glusterfs/1b9a37ab-6329-4037-84c1-fd8734cbf41b
  2097485      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  7 23:31 ./maglev-system.glusterfs/8b5ac05f-5e7b-43a5-a801-013ba7e0f6de
   658620      4 drwxr-xr-x   2 dnac     dnac         4096 Jan  8 09:01 ./backup-metadata
   393413      4 drwxrwxr-x   5 dnac     dnac         4096 Jan  8 09:01 ./fusion.postgres
   393028      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  8 09:01 ./fusion.postgres/438213ea-3d5e-4428-8602-2440136d8478
   393422      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  7 22:47 ./fusion.postgres/1b9a37ab-6329-4037-84c1-fd8734cbf41b
   407472      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  7 23:31 ./fusion.postgres/8b5ac05f-5e7b-43a5-a801-013ba7e0f6de
   392531      4 drwxrwxr-x   5 dnac     dnac         4096 Jan  8 09:00 ./maglev-system.mongodb
   392534      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  8 09:01 ./maglev-system.mongodb/438213ea-3d5e-4428-8602-2440136d8478
   393419      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  7 22:47 ./maglev-system.mongodb/1b9a37ab-6329-4037-84c1-fd8734cbf41b
   393421      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  7 23:31 ./maglev-system.mongodb/8b5ac05f-5e7b-43a5-a801-013ba7e0f6de
   392471      4 drwxrwxr-x   5 dnac     dnac         4096 Jan  8 09:00 ./ndp.redis
  2095509      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  8 09:00 ./ndp.redis/438213ea-3d5e-4428-8602-2440136d8478
   658624      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  7 22:46 ./ndp.redis/1b9a37ab-6329-4037-84c1-fd8734cbf41b
   658638      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  7 23:30 ./ndp.redis/8b5ac05f-5e7b-43a5-a801-013ba7e0f6de

 

To check backup-id you need to hover over backup-name in UI. 

 

Currently there is no official API to handle backups but indeed you can handle it on the server side. 

 

By removing all folders + associated backup-metadata json file in directory ./backup-metadata via cmd:

 

rm -rf */1b9a37ab-6329-4037-84c1-fd8734cbf41b*

 

leading to:

 

$ find -maxdepth 2 -type d -ls
   392470      4 drwxrwxr-x   9 dnac     dnac         4096 Jan  8 09:00 .
   392533      4 drwxrwxr-x   4 dnac     dnac         4096 Jan  8 09:05 ./maglev-system.credentialmanager
  1570337      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  8 09:00 ./maglev-system.credentialmanager/438213ea-3d5e-4428-8602-2440136d8478
  1578801      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  7 23:30 ./maglev-system.credentialmanager/8b5ac05f-5e7b-43a5-a801-013ba7e0f6de
   392473      4 drwxrwxr-x   4 dnac     dnac         4096 Jan  8 09:05 ./app-hosting.postgres
   785642      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  8 09:00 ./app-hosting.postgres/438213ea-3d5e-4428-8602-2440136d8478
   790344      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  7 23:30 ./app-hosting.postgres/8b5ac05f-5e7b-43a5-a801-013ba7e0f6de
   392532      4 drwxrwxr-x   4 dnac     dnac         4096 Jan  8 09:05 ./maglev-system.glusterfs
  2095515      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  8 09:01 ./maglev-system.glusterfs/438213ea-3d5e-4428-8602-2440136d8478
  2097485      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  7 23:31 ./maglev-system.glusterfs/8b5ac05f-5e7b-43a5-a801-013ba7e0f6de
   658620      4 drwxr-xr-x   2 dnac     dnac         4096 Jan  8 09:05 ./backup-metadata
   393413      4 drwxrwxr-x   4 dnac     dnac         4096 Jan  8 09:05 ./fusion.postgres
   393028      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  8 09:01 ./fusion.postgres/438213ea-3d5e-4428-8602-2440136d8478
   407472      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  7 23:31 ./fusion.postgres/8b5ac05f-5e7b-43a5-a801-013ba7e0f6de
   392531      4 drwxrwxr-x   4 dnac     dnac         4096 Jan  8 09:05 ./maglev-system.mongodb
   392534      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  8 09:01 ./maglev-system.mongodb/438213ea-3d5e-4428-8602-2440136d8478
   393421      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  7 23:31 ./maglev-system.mongodb/8b5ac05f-5e7b-43a5-a801-013ba7e0f6de
   392471      4 drwxrwxr-x   4 dnac     dnac         4096 Jan  8 09:05 ./ndp.redis
  2095509      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  8 09:00 ./ndp.redis/438213ea-3d5e-4428-8602-2440136d8478
   658638      4 drwxrwxr-x   3 dnac     dnac         4096 Jan  7 23:30 ./ndp.redis/8b5ac05f-5e7b-43a5-a801-013ba7e0f6de

 

 

all specific data should be removed and Cisco DNA-Center will get it reflected in UI (you might need to wait a bit and/or click refresh on backup screen). 

 

Hope it helps! Let me know if you have any further queries. 

 

Regards,
Mariusz

View solution in original post

CreatePlease to create content
Content for Community-Ad