OAyomide / dugbe

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DUGBE: A simple tool to backup Railway.app hosted Databases

Dugbe is a simple tool to backup Railway.app hosted Databases.

Railway.app is a great infrastructure platform but at the moment, your best bet backing up a database is connecting AWS. Dugbe aims to make this process easier by providing a simple CLI tool to backup your data.

While this has not been battle tested as much as I would like, I currently use it to backup my Orchdio databases. I'd be glad to take a look at any issues you may have while trying to use the basic functionality ——backup some database.

What do you need?

  • A Railway.app account.
  • A project with a database. For now, its recommended to pass a project that has just 1 database plugin installed. This is because Dugbe will backup the first DB it gets back from the API.
  • An API token. You can check the docs here to see how to you can get started with API.
  • pg_dump installed on your machine. You may find this helpful on how to see how to install it on your machine.

How to use

# Install dugbe
Please install by cloning this repo. Then update your environment variables with your Railway.app API token. A sample .env file is provided.
# Run dugbe
dugbe backup --output './backup.sql` --service <your railway.app db hosted service> --database <the URL of the db you want to backup>

What's next?

  • Add support for backing up multiple databases.
  • Better UI and progress update.
  • Env variable support from flag.
  • Publish to crates.io
  • Add support for other DBs. Currently only postgres is supported.

Whats broken or "weird"?

You may get an error like: Railway backup error

This seems to be a non-fatal error and this (tracking) issue might be helpful. I suspect this might be helpful because IIRC, Railway.app uses TimescaleDB for its Postgres offering.

Dependencies

About


Languages

Language:Rust 100.0%