Metadata-Version: 2.1
Name: databudgie
Version: 2.7.2
Summary: Ergonomic and flexible tool for database backup and restore
Home-page: https://github.com/schireson/databudgie
License: MIT
Keywords: sqlalchemy,postgres,database,etl,s3
Author: Andrew Sosa
Author-email: andrewso@known.is
Requires-Python: >=3.7,<4
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: System :: Archiving :: Backup
Provides-Extra: psycopg2
Provides-Extra: psycopg2-binary
Provides-Extra: s3
Provides-Extra: sentry
Requires-Dist: boto3; extra == "s3"
Requires-Dist: click (>=7.0.0)
Requires-Dist: configly[yaml]
Requires-Dist: importlib-metadata; python_version < "3.8"
Requires-Dist: psycopg2 (>=2.7); extra == "psycopg2"
Requires-Dist: psycopg2-binary (>=2.7); extra == "psycopg2-binary"
Requires-Dist: rich
Requires-Dist: sentry-sdk; extra == "sentry"
Requires-Dist: sqlalchemy (>=1.3)
Requires-Dist: strapp[click,sqlalchemy] (>=0.2.7)
Requires-Dist: typing-extensions (>=3.10.0); python_version < "3.8"
Project-URL: Repository, https://github.com/schireson/databudgie
Description-Content-Type: text/markdown

# Databudgie

![Github Actions Build](https://github.com/schireson/databudgie/actions/workflows/build.yml/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/schireson/databudgie/badge.svg?branch=main&t=6I0aU6)](https://coveralls.io/github/schireson/databudgie?branch=main)
[![Documentation
Status](https://readthedocs.org/projects/databudgie/badge/?version=latest)](https://databudgie.readthedocs.io)

![](docs/source/_static/databudgie.png)

Databudgie is a CLI & library for database performing targeted backup and restore
of database tables or arbitrary queries against database tables.

# Usage

A minimal config file might look like:

```yaml
# config.databudgie.yml
backup:
  url: postgresql://postgres:postgres@localhost:5432/postgres
  tables:
    - name: public.product
      query: "select * from {table} where store_id > 4"
      location: s3://my-s3-bucket/databudgie/public.product
restore:
  url: postgresql://postgres:postgres@localhost:5432/postgres
  tables:
    - name: public.product
      location: s3://my-s3-bucket/databudgie/public.product
```

With that config in place, backing up the defined tables (using the specified config)
is as simple as `databudgie backup`; and restore `databudgie restore`.

## Installation

```bash
pip install databudgie
```

