Skip to main content

A tool to upgrade DuckDB database files.

Project description

duckdb-upgrade

Tests

A tool to easily upgrade duckdb databases from one version to another. It automates the process of exporting the contents of a DuckDB database and then importing them into a newer version of a DuckDB database.

[!IMPORTANT] This process isn't guaranteed to be compatible with every combination of DuckDB. The tool is limited to forward upgrades only, but things may still break during that upgrade. By default this tool keeps a backup of the old version of the database, but it is still important to be mindful of any process that may cause data corruption. Any data loss or corruption is on you, so exercise reasonable precautions before use.

Usage

This tool is available both through pip and Docker. Use one of the following commands to run it, or your preferred method to run Python packages or Docker images. These examples cover upgrading some DuckDB in the current directory to the latest version of the database.

via Pipx

$ pipx run duckdb-upgrade example.duckdb

via Docker

$ docker run -v $(pwd):/data ghcr.io/mrflynn/duckdb-upgrade:latest /data/example.duckdb

Advanced Usage

You can also specify the target version you with to upgrade to using the -t flag. For example, if you wish to upgrade some database to version 0.10.0, run the command as follows:

$ duckdb-upgrade -t '0.10.0' example.duckdb

[!CAUTION] You can also run the tool with the --no-backup flag which won't create a backup of the original database before upgrading it. This is potentially dangerous, so please use with caution. Again, any data loss resulting from this is on you.

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

duckdb_upgrade-0.1.1.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

duckdb_upgrade-0.1.1-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file duckdb_upgrade-0.1.1.tar.gz.

File metadata

  • Download URL: duckdb_upgrade-0.1.1.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for duckdb_upgrade-0.1.1.tar.gz
Algorithm Hash digest
SHA256 976b1daea22488a536b56965892e9797bee72cb37edbba54b6d3f8160d70728e
MD5 24219225266059b041eccc979c770789
BLAKE2b-256 d157743c0b20fa21d40fd1fe1f10518f52cdb66a77dcbde66f8389069973ee85

See more details on using hashes here.

File details

Details for the file duckdb_upgrade-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for duckdb_upgrade-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b0eb137bda036d3e15f4948890724d322549726305fba1d57cbd85854715a0f3
MD5 3c9f474fef4ba94421b466d399ee2d3c
BLAKE2b-256 7ab6c0ac057f833c7a26020876d920739ff0a6520f7452ae3c241876f4167e8a

See more details on using hashes here.

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