Skip to main content

Copy contents of a SQL database to another

Project description

dbcopy

Copy tables from a source database to a destination database, with both databases using different SQL engines. This can be used, for example, to copy the contents from a MySQL or MSSQL database to Postgres. While less civilized, the opposite operation might also work :-P

Installation

Please install dbcopy using the Python pip command:

pip install -U dbcopy

Depending on the database backend, you may need to also install a connection adapter. Recommended adapters can be installed as extras with the package:

pip install -U dbcopy[postgres,mssql]

Usage

You must always specify a source database connection URI and a target database URI:

dbcopy --drop postgresql://localhost/demo sqlite:///demo.sqlite3

There are additional parameters to skip individual tables or normalize tables and column names to the common snake_case form. For these options, please see:

dbcopy --help

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

dbcopy-0.1.2.tar.gz (3.8 kB view hashes)

Uploaded Source

Built Distribution

dbcopy-0.1.2-py2.py3-none-any.whl (5.5 kB view hashes)

Uploaded Python 2 Python 3

Supported by

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