You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

dbt

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dbt

Database Shell Toolkit

0.2.0
Source
npm
Version published
Weekly downloads
22
175%
Maintainers
1
Weekly downloads
 
Created
Source

dbt

                         ________
    _ _    _        ____//______\\_____
 __| | |__| |_     /__________________/|
| _  |  _ |  _|    |     |______|    | |
|____|____|___|    |_________________|/

Usage

The dbt command makes it easy to connect to your database, create snapshots and restore from these at a later time.

To connect to the database:

dbt

To create a snapshot:

dbt --snapshot

To restore from the most recent snapshot, based on timestamp on file:

dbt --restore

To restore from a specific snapshot:

dbt --restore db/snapshots/my_database.dump

By default the snapshots are stored in db/snapshots but they can be saved anywhere if the path is specified.

To find out what configuration is being used:

dbt --info

To find out what configuration is being used in a particular environment:

dbt --env test --info

Configuration

The connection configuration is read from config/ in the form of a database.yml (Ruby on Rails) or database.json (Sequelize) file.

Notes

Often saving and restoring PostgreSQL database snapshots takes a little work to get things to line up correctly. dbt should handle most of that for you.

The ownership is automatically changed to whatever username is defined in the database configuration.

(C) 2014 Scott Tadman, The Working Group Inc. and other contributors.

Using the MIT License as described in the LICENSE file.

Keywords

database

FAQs

Package last updated on 20 Jun 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts