Skip to main content

A better, faster, stronger alternative for manage.py dumpdata

Project description

django-dumpdb saves and restored the contents of the database in a simple database-independent format.

It is designed to be fast and memory efficient, and can handle a database of ANY size, in a reasonable time, with a fixed memory footprint.

Features

  • Stream-oriented file format.

  • Accesses the database directly, bypassing the ORM layer for better performance.

  • Uses server-side database cursors to preserve memory.

  • Can hanldle data with ForeignKey('self') and forward references.

Supported database backends

django-dumpdb uses server-side cursors and deferred foreign key checks, which is not supported by Django as of now. Therefore, it has to use some DB-specific code. The following database backends are currently supported:

  • postgresql_psycopg2

  • mysql

  • sqlite

Installation

Add django_dumpdb to your INSTALLED_APPS.

Usage

manage.py dumpdb > db.dump
manage.py restoredb < db.dump

Or even:

ssh remotehost /var/www/myproject/manage.py dumpdb | manage.py restoredb

django-dumpdb can also be used to migrate the data to another database (for example, from MySQL to PostgreSQL).

Disclaimer

USE THIS AT YOUR OWN RISK! THIS SOFTWARE MAY CONTAIN BUGS, AND MAY DESTROY YOUR DATA AND KILL YOUR PARENTS, EVEN IF USED CORRECTLY. YOU HAVE BEEN WARNED!

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distribution

django-dumpdb-0.1.tar.gz (8.5 kB view details)

Uploaded Source

File details

Details for the file django-dumpdb-0.1.tar.gz.

File metadata

  • Download URL: django-dumpdb-0.1.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for django-dumpdb-0.1.tar.gz
Algorithm Hash digest
SHA256 ae88f255e97928e10453ec85fc7ac0ec2d4293534bcf51a8906c02575308a723
MD5 3e0507bda5f5ebe17eb65ae6eef57bcd
BLAKE2b-256 5c4d6d81b99bcaf6cd92215de47f810595c06896205d45c9a575cb67f1a7efd8

See more details on using hashes here.

Supported by

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