Skip to main content

Backup tool for PowerDNS database

Project description

What is this?

Build Testing Pypi

powerdns auth 4.8.x

python 3.11.x

Backup tool for PowerDNS database (MySQL) to bind style zones with severals outputs:

  • local file storage
  • s3 storage

PyPI

Deploy the pdnsbackyp tool in your server with the pip command.

pip install pdnsbackup

After installation, you can execute the pdnsbackup to start-it.

Docker run

sudo docker run --rm --env-file ./.env --name=pdnsbackup dmachard/pdnsbackup:latest

Configuration

This tool can be configurated with severals ways. See the default config file:

  • from external configuration file (-c config argument)

  • from environment variables

Variables Description
PDNSBACKUP_DEBUG debug mode 1 or 0
Variables Description
PDNSBACKUP_GMYSQL_ENABLED (1
PDNSBACKUP_GMYSQL_HOST mysql port, default is 127.0.0.1
PDNSBACKUP_GMYSQL_PORT mysql port, default is 3306
PDNSBACKUP_GMYSQL_SSL enable ssl, default is 0
PDNSBACKUP_GMYSQL_DBNAME mysql database name
PDNSBACKUP_GMYSQL_USER mysql user
PDNSBACKUP_GMYSQL_PASSWORD mysql password
Variables Description
PDNSBACKUP_FILE_ENABLED (1
PDNSBACKUP_FILE_PATH_BIND zone bind path
PDNSBACKUP_FILE_PATH_OUTPUT output folder
Variables Description
PDNSBACKUP_S3_ENABLED (1
PDNSBACKUP_S3_ENDPOINT_URL your s3 url
PDNSBACKUP_S3_SSL_VERIFY disable ssl verify
PDNSBACKUP_S3_ACCESS_KEY_ID your access key
PDNSBACKUP_S3_SECRET_ACCESS_KEY your secret access key
PDNSBACKUP_S3_BUCKET_NAME bucket name

Run from source

Create a .env file to populate your variable

Create a virtualenv

python -m venv venv
source venv/bin/activate

Install requirements and run-it

python3 -m pip install -r requirements.txt
python3 -c "import pdnsbackup; pdnsbackup.run();"

Build and run from docker image

sudo docker build . --file Dockerfile -t pdnsbackup

Run tests

Run all tests

python -m unittest discover -v tests/

Run one by one

python -m unittest -v tests.test_config
python -m unittest -v tests.test_parser
python -m unittest -v tests.test_export

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pdnsbackup-0.2.0.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pdnsbackup-0.2.0-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file pdnsbackup-0.2.0.tar.gz.

File metadata

  • Download URL: pdnsbackup-0.2.0.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for pdnsbackup-0.2.0.tar.gz
Algorithm Hash digest
SHA256 a42ee1390d68d64e460abe5f17fa60f82da503af29ea49821b0e4f8736cae12d
MD5 9eb5bf1c1d3d066bcce355e225918d64
BLAKE2b-256 a6d0420e60d39879eeb2c9a4c36197f5c6928cc0bd2889145e1330f75f3aab28

See more details on using hashes here.

File details

Details for the file pdnsbackup-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: pdnsbackup-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for pdnsbackup-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6f0950624d42a1464e8dad876b218014ae775f0abfef08681defd930c078591b
MD5 5c8ffea6a4c896921fb04552b9040ad4
BLAKE2b-256 368a636de2953233c5173ea69c7dfba2c7f65532ec54c64e9263c9cd20278a95

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page