This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Project Description

This holds the necessary code to use existing database dump tools with gpg to create a full backup of a disk in an encrypted format that can sit on disk more safely than just a text dump of that database.

This library was originally created for RatticWeb which made the decision to not handle encryption within the application itself (encryption is difficult).

Usage

There are two commands of importance in this library.

db_backup.commands.backup(database_settings, recipients, backup_dir, gpg_home=None)

This will dump the database as specified by database_settings and create a gpg encrypted file inside the specified backup_dir (using the gpg_home if specified, otherwise whatever the gpg binary on your system wants to use) that can only be decrypted by the specified recipients.

database_settings is a dictionary of {name, engine, port, host, user, password} where all values except name and engine are optional.

engine is one of sqlite3, psql or mysql or the names of the equivalent backends in django.db.backends (i.e. django database dictionary is fine)

recipients is a list of strings where each string is the uid for a key in your gpg homedir.

db_backup.commands.restore(database_settings, restore_from, gpg_home=None)

This will take the gpg encrypted file at restore_from, decrypt it and feed the specified database with it.

database_settings and gpg_home behave like they do for the backup command.

restore_from is just the filepath to the encrypted backup file.

Installation

Use pip!:

pip install db_backup

Or if you’re developing it:

pip install -e .
pip install -e ".[tests]"

Tests

Run the helpful script:

./test.sh

Or if you’re outside a virtualenv and want to test with old pythons as well:

tox
Release History

Release History

0.1.3

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
db_backup-0.1.3.tar.gz (7.4 kB) Copy SHA256 Checksum SHA256 Source Apr 6, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting