All Projects → sdelements → flan

sdelements / flan

Licence: MIT license
A tasty tool that lets you save, load and share postgres snapshots with ease

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to flan

Flask Boilerplate
Simple flask boilerplate with Postgres, Docker, and Heroku/Zeit now
Stars: ✭ 251 (+41.81%)
Mutual labels:  postgres
postgresql lwrp
Express 42 postgresql cookbook
Stars: ✭ 57 (-67.8%)
Mutual labels:  postgres
migrant lib
Embeddable migration management
Stars: ✭ 22 (-87.57%)
Mutual labels:  postgres
Pg insights
A collection of convenient SQL for monitoring Postgres database health.
Stars: ✭ 253 (+42.94%)
Mutual labels:  postgres
shyft
⬡ Shyft is a server-side framework for building powerful GraphQL APIs 🚀
Stars: ✭ 56 (-68.36%)
Mutual labels:  postgres
clunk
Clojure Postgres w/out JDBC
Stars: ✭ 25 (-85.88%)
Mutual labels:  postgres
Wasmer Postgres
💽🕸 Postgres library to run WebAssembly binaries.
Stars: ✭ 245 (+38.42%)
Mutual labels:  postgres
rocket-rest-api-with-jwt
A Rusty Rocket fuelled with Diesel and secured by JWT
Stars: ✭ 62 (-64.97%)
Mutual labels:  postgres
pg-search-sequelize
Postgres full-text search in Node.js and Sequelize.
Stars: ✭ 31 (-82.49%)
Mutual labels:  postgres
pg global temp tables
Oracle-style global temporary tables for PostgreSQL
Stars: ✭ 16 (-90.96%)
Mutual labels:  postgres
IreneBot
Irene Bot for Discord in Python
Stars: ✭ 15 (-91.53%)
Mutual labels:  postgres
event bus postgres
🐘 Postgres event store for event_bus
Stars: ✭ 49 (-72.32%)
Mutual labels:  postgres
pgxmock
pgx mock driver for golang to test database interactions
Stars: ✭ 97 (-45.2%)
Mutual labels:  postgres
Pg Extend Rs
Postgres extension library for Rust
Stars: ✭ 253 (+42.94%)
Mutual labels:  postgres
Odin-Securities
A master database of securities data for use with the Odin algorithmic trading platform.
Stars: ✭ 17 (-90.4%)
Mutual labels:  postgres
Pg similarity
set of functions and operators for executing similarity queries
Stars: ✭ 250 (+41.24%)
Mutual labels:  postgres
pg-pubsub
Reliable PostgreSQL LISTEN/NOTIFY with inter-process lock support
Stars: ✭ 50 (-71.75%)
Mutual labels:  postgres
gae-postgres
Connect to Cloud SQL for PostgreSQL from Google App Engine
Stars: ✭ 23 (-87.01%)
Mutual labels:  postgres
pgsink
Logically replicate data out of Postgres into sinks (files, Google BigQuery, etc)
Stars: ✭ 53 (-70.06%)
Mutual labels:  postgres
phpPgAdmin6
PHP7+ Based administration tool for PostgreSQL 9.3+
Stars: ✭ 45 (-74.58%)
Mutual labels:  postgres

flan

A tasty tool that lets you save, load and share postgres snapshots with ease.

oclif Version Downloads/week License

Usage

$ npm install -g @sdelements/flan

$ flan init
running setup...

$ flan save [email protected]
saving...

$ flan load [email protected]
loading...

$ flan publish [email protected]
publishing...

$ flan available
available snapshots...

$ flan (-v|--version|version)
@sdelements/flan/0.1.0-alpha.0 darwin-x64 node-v14.16.1

$ flan --help [COMMAND]
USAGE
  $ flan COMMAND
...

How it works

Under the hood flan is a convenient wrapper for pgdump and pgrestore. It uses parallel jobs by default to ensure dumping/restoring your database is quick.

Sharing database dumps is achieved by leveraging git. Essentially you push a tag to a repository of your choosing (defined in flan.config.js) and others can then pull it with flan fetch. We chose to use git because it fits well with our internal tooling and process but we understand it may not be the best solution for you. Pull requests are welcome if you're interested in using S3/Azure/etc as a store 🙂

⚠️ WARNING: Please don't use flan in situations where you can't afford data loss.

Commands

flan autocomplete [SHELL]

display autocomplete installation instructions

USAGE
  $ flan autocomplete [SHELL]

ARGUMENTS
  SHELL  shell type

OPTIONS
  -r, --refresh-cache  Refresh cache (ignores displaying instructions)

EXAMPLES
  $ flan autocomplete
  $ flan autocomplete bash
  $ flan autocomplete zsh
  $ flan autocomplete --refresh-cache

See code: @oclif/plugin-autocomplete

flan available

lists available dumps

USAGE
  $ flan available

OPTIONS
  -c, --config=config     [default: ./flan.config.json] Path to configuration file
  -x, --extended          show extra columns
  --columns=columns       only show provided columns (comma-separated)
  --csv                   output is csv format [alias: --output=csv]
  --filter=filter         filter property by partial string matching, ex: name=foo
  --no-header             hide table header from output
  --no-truncate           do not truncate output to fit screen
  --output=csv|json|yaml  output in a more machine friendly format
  --sort=sort             [default: tag] property to sort by (prepend '-' for descending)

EXAMPLE
  $ flan available

See code: src/commands/available.ts

flan delete DELETEFILE

delete a local database dump

USAGE
  $ flan delete DELETEFILE

ARGUMENTS
  DELETEFILE  name of file to delete

OPTIONS
  -c, --config=config  [default: ./flan.config.json] Path to configuration file

EXAMPLES
  $ flan delete myDB
  $ flan delete [email protected]

See code: src/commands/delete.ts

flan fetch FILE

fetch specified dump file from a remote repository

USAGE
  $ flan fetch FILE

ARGUMENTS
  FILE  name of the file

OPTIONS
  -c, --config=config  [default: ./flan.config.json] Path to configuration file

EXAMPLE
  $ flan fetch filename

See code: src/commands/fetch.ts

flan help [COMMAND]

display help for flan

USAGE
  $ flan help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

flan init

Initializes flan for this project

USAGE
  $ flan init

OPTIONS
  -c, --config=config  [default: ./flan.config.json] Path to configuration file
  -y, --yes            Auto confirm directory creating questions

EXAMPLES
  $ flan init
  Config file found at home/flan.config.js

  $ flan init
  A config file will be created, continue? [y/n]

  $ flan init -c /some-folder/flan.config.json
  Config file found at home/flan/some-folder/flan.config.json

  $ flan init -y -c /some-folder/flan.config.json
  Config file found at /home/flan/some-folder/flan.config.json
  The base directory has been created successfully at /home/flan/some-folder/.flan
  The save directory has been created successfully at /home/flan/some-folder/.flan/local
  Git repository initialized at /home/flan/some-folder/.flan/repo

See code: src/commands/init.ts

flan list

lists available dumps

USAGE
  $ flan list

OPTIONS
  -c, --config=config  [default: ./flan.config.json] Path to configuration file

EXAMPLE
  $ flan list

See code: src/commands/list.ts

flan load INPUT

load database from dump

USAGE
  $ flan load INPUT

ARGUMENTS
  INPUT  name of input file

OPTIONS
  -c, --config=config  [default: ./flan.config.json] Path to configuration file
  --drop-db            Drops and re-creates the DB before restoring it's data
  --quiet              Supress errors from pg_restore

EXAMPLES
  $ flan load myDB
  $ flan load --drop-db --quiet myDB

See code: src/commands/load.ts

flan publish FILE

publish specified dump file to a remote repository

USAGE
  $ flan publish FILE

ARGUMENTS
  FILE  name of the file

OPTIONS
  -c, --config=config  [default: ./flan.config.json] Path to configuration file

EXAMPLE
  $ flan publish filename

See code: src/commands/publish.ts

flan save OUTPUT

save current database to dump

USAGE
  $ flan save OUTPUT

ARGUMENTS
  OUTPUT  name of output file

OPTIONS
  -c, --config=config  [default: ./flan.config.json] Path to configuration file

EXAMPLE
  $ flan save myDB

See code: src/commands/save.ts

flan unpublish FILE

unpublish specified database dump from a remote repository

USAGE
  $ flan unpublish FILE

ARGUMENTS
  FILE  name of the file

OPTIONS
  -c, --config=config  [default: ./flan.config.json] Path to configuration file

EXAMPLE
  $ flan unpublish [email protected]

See code: src/commands/unpublish.ts


From Toronto with love ❤️

👩‍🍳 🥧 👨‍🍳 🥧 👩‍🍳 🥧 👨‍🍳 🥧 👨‍🍳
Built by Team Pie
Special thanks to @revangel for the logo

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].