Skip to main content

ciscodnacbackupctl

PyPI PyPI - Downloads GitHub last commit GitHub code size in bytes GitHub issues GitHub closed issues Libraries.io dependency status for GitHub repo GitHub Repo stars

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)


Why?

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

Features

  • List all backups
  • History/On-going backups
  • Delete backup
  • Purge backups (all or just incompatible ones)
  • Schedule backups
    • New Backup
    • Purge
  • Debug HTTP

Unsupported features

  • 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

Installation

pip install ciscodnacbackupctl

Config

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

Technologies & Frameworks Used

Cisco Products & Services:

  • Cisco DNA Center

Tools & Frameworks:

  • rich
  • tabulate
  • hurry
  • click
  • schedule
  • daemonocle

Daemon or Docker

This makes it possible to automatically purge old backups daily

Daemon

ciscodnacbackupctl daemon start --keep 3

Docker Support

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

Authors & Maintainers

Smart people responsible for the creation and maintenance of this project:

License

This project is licensed to you under the terms of the Cisco Sample Code License.

Release files for ciscodnacbackupctl 0.2.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ciscodnacbackupctl 0.2.12
File Size Uploaded
ciscodnacbackupctl-0.2.12.tar.gz 15.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ciscodnacbackupctl 0.2.12
File Interpreter ABI Platform
ciscodnacbackupctl-0.2.12-py3-none-any.whl Python 3 none any Details

Total release size: 31.4 kB

Release files / ciscodnacbackupctl-0.2.12.tar.gz

Download URL ciscodnacbackupctl-0.2.12.tar.gz
Size 15.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e76e7fb0171cebc690e135a418bf22e6664ed07d6e868c465198e68913805b96
BLAKE2b-256 checksum
How to use checksums
b592398c9796167293b96640cdecd734457a5e4bad41b09a3bfbdf5bfa71eb43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.4

Release files / ciscodnacbackupctl-0.2.12-py3-none-any.whl

Download URL ciscodnacbackupctl-0.2.12-py3-none-any.whl
Size 16.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e7d9cf1ed9f0900bc09621a2d5115ee6f8c28759aa635fd7656fa1644ec2a476
BLAKE2b-256 checksum
How to use checksums
7cd909ac48f44ffb652794dae25e8eafd80590ff5508000bf3d81996f9dce574
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.4

Release history Release notifications | RSS feed

This release

0.2.12 This release

2 release files

0.2.10

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.3

2 release files

0.2.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page