Skip to content

standalone library/cli tool for database backup/restore

License

Notifications You must be signed in to change notification settings

schireson/databudgie

Folders and files

NameName
Last commit message
Last commit date
Aug 8, 2024
Feb 20, 2024
Jul 6, 2023
Aug 8, 2024
Nov 9, 2022
Nov 9, 2022
Jun 30, 2023
Feb 20, 2024
Nov 9, 2022
May 2, 2023
Nov 9, 2022
Jun 15, 2023
Apr 27, 2023
Aug 8, 2024
Aug 8, 2024
Mar 15, 2023

Repository files navigation

Databudgie

Github Actions Build Coverage Status Documentation Status

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:

# 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.

Installation

pip install databudgie