Databudgie is a CLI & library for database performing targeted backup and restore of database tables or arbitrary queries against database tables.
A minimal config file might look like:
# databudgie.yml or 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
.
pip install databudgie