This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Back up your databases and media directory to a local file/directory or Amazon Glacier. Works with PostgreSQL, MySQL and sqlite.

A fork of (a fork of) django-backup which adds:

  • Multiple database support
  • Optionally save your backups to Amazon Glacier
  • Less assumptions about presence of a Bourne-like shell and GNU tools
  • Less tarballception (no more redundant tarballs inside tarballs)
  • Postgres-specific improvements:
    • Uses the custom archive type for pg_dump, for maximum flexibility at restore time, so there’s no need to worry about having to hand-edit or craft cryptic regexes for a many-thousand-line SQL file when restoring just because the wrong command line flags were used when making the backup.
    • Doesn’t pass PostgreSQL database password via command line argument, as doing so can reveal your database password to other users on the same machine.

Warning to MySQL Users: This script may expose your MySQL database password to other users on the same machine, as it is passed in via a command line argument. Pull requests to fix this problem are welcome.

Installation

Run pip install django-icybackup, then add icybackup to your INSTALLED_APPS.

Usage

Backing up

  • manage.py backup -o backup.tgz - back up to backup.tgz
  • manage.py backup -d backups - back up to backups/[CURRENT_DATETIME].tgz
  • manage.py backup -g arn:was:glacier:us-east-1:2584098540980:vaults/my-website-backups - backup to the my-website-backups Amazon Glacier vault, given by it’s ARN
  • manage.py backup --stdout - back up to stdout

Supports the following optional flags:

  • -e extra_file - Add an extra file or directory to the backup (can be specified multiple times)

Restoring

  • manage.py restore -i backup.tgz - restore from backup.tgz
  • manage.py restore --stdin - restore from stdin

Optional flags:

  • --pg-restore-flags - flags to pass to the pg_restore process (default is Oxc). If the database you’re restoring into exists and is empty, use --pg-restore-flags=Ox.

Tip: If you want to move servers, or copy your production database/media exactly to development or staging, it is possible to do something like this:

ssh other-server 'cd path/to/app && manage.py backup --stdout' | manage.py restore --stdin

settings.py settings

  • AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY - Optional, but required for Amazon Glacier upload to work.
  • PG_DUMP_BIN, PG_RESTORE_BIN, MYSQLDUMP_BIN, MYSQL_BIN - Optional. Set these to the full paths to the pg_dump and pg_restore, mysqldump and mysql binaries. If not set, icybackup will try to find them on the search path. (Note that cron jobs often run with a much smaller search path, so it’s a good idea to set these if you’re backing up using cron.)

To do

  • Backup directory cleanup command
  • Tests
  • remove password from mysqldump process name
  • Restore command
  • Commands to reconcile and prune Glacier backups

Contributors

The following people contributed code to this project or its ancestors, in chronological order by first commit:

  • Dmitriy Kovalev
  • Ted Tieken
  • Chris Cohoat
  • Jamie Matthews
  • Yar Kravtsov
  • Adam Brenecki, St Barnabas’ Theological College

License

Copyright © 2012, St Barnabas’ Theological College Copyright © 2011, Ted Tieken Copyright © 2011, http://code.google.com/p/django-backup/ All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Release History

Release History

0.1.1

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

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.1pre1

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.1pre

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.1a4

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.1a3

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.1a2

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

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-icybackup-0.1.1.tar.gz (9.0 kB) Copy SHA256 Checksum SHA256 Source Jan 15, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development 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