Cisco DNA Center Backup Tool (as a CLI tool)
Helps you to manage your backups and purge previous backups and also incompatible backups (between versions)
In the current state of Cisco DNA Center, it's possible to schedule and perform backups.
But there's no automated way of purging backups and users are asked to purge backups through the Web UI
ciscodnacbackupctl
offers a CLI interface to handle your backups from your terminal or as a daemon/docker container
- List all backups
- History/On-going backups
- Delete backup
- Purge backups (all or just incompatible ones)
- Schedule backups
- New Backup
- Purge
- Debug HTTP
- Assurance backups (NFS)
- "The Assurance data consists of network assurance and analytics data. The first backup of Assurance data is a full backup. After that, backups are incremental."
- Details
pip install ciscodnacbackupctl
ciscodnacbackupctl config --help
Usage: ciscodnacbackupctl config [OPTIONS]
Options:
--env / --no-env
--hostname TEXT [required]
--username TEXT [required]
--password TEXT [required]
--secure Secure HTTPS towards Cisco DNA Center
--encode Encode Cisco DNA Center config to Base64 string
--overwrite Writes over the existing config for Cisco DNA Center
--help Show this message and exit.
Usage: ciscodnacbackupctl [OPTIONS] COMMAND [ARGS]...
Options:
--debug / --no-debug
--version Show the version and exit.
--help Show this message and exit.
Commands:
config
create
daemon ['start', 'stop', 'restart', 'status']
delete
history
list
progress
purge
schedule_backup
schedule_purge
whoami
Cisco Products & Services:
- Cisco DNA Center
Tools & Frameworks:
- rich
- tabulate
- hurry
- click
- schedule
- daemonocle
This makes it possible to automatically purge old backups daily
ciscodnacbackupctl daemon start --keep 3
Generate Cisco DNA Center config as Base64 string
docker run -it --rm robertcsapo/ciscodnacbackupctl config --env --hostname <dnachost> --username <username> --password <password> --encode
Use the ENV to exucute commands
List
docker run -it --rm \
-e DNAC_CONFIG=ewogICAgImRuYWMiOiB7CiAgICAgICAgImhvc3RuYW1lIjogInNhbXBsZS5ob3N0LnRsZCIsCiAgICAgICAgInVzZXJuYW1lIjogImRuYWMiLAogICAgICAgICJwYXNzd29yZCI6ICJwYXNzdzByZCIsCiAgICAgICAgInNlY3VyZSI6IGZhbHNlCiAgICB9Cn0 \
robertcsapo/ciscodnacbackupctl \
list
Purge
docker run -it --rm \
-e DNAC_CONFIG=ewogICAgImRuYWMiOiB7CiAgICAgICAgImhvc3RuYW1lIjogInNhbXBsZS5ob3N0LnRsZCIsCiAgICAgICAgInVzZXJuYW1lIjogImRuYWMiLAogICAgICAgICJwYXNzd29yZCI6ICJwYXNzdzByZCIsCiAgICAgICAgInNlY3VyZSI6IGZhbHNlCiAgICB9Cn0 \
robertcsapo/ciscodnacbackupctl \
purge
Smart people responsible for the creation and maintenance of this project:
- Christina Skoglund [email protected]
- Robert Csapo [email protected]
This project is licensed to you under the terms of the Cisco Sample Code License.