0.0.7 • Published 1 year ago

@viadee/nibbler v0.0.7

Weekly downloads
-
License
UNLICENSED
Repository
-
Last release
1 year ago

Nibbler

This little fellow handles backups and restores for your PostgreSQL databases with a handy wizard directly from your terminal.

Usage

To run Nibbler just use npx @viadee/nibbler@latest. The tool will guide you through the process. Just make sure to create an nibbler.config.js file in the directory where you want to use Nibbler. The file should look like this:

const config = {
  pg: '/usr/local/opt/libpq/bin',
  dumps: './dumps',
  servers: {
    local: {
      host: 'localhost',
      port: 5432,
      username: 'username',
      password: 'password',
      defaultDb: 'postgres',
    },
    'managed-server': {
      host: 'postgresql-my-hoster.net',
      port: 5432,
      username: 'username',
      password: 'password',
      defaultDb: 'postgres',
      secure: true,
      production: true,
    },
  },
};

export default config;

The following properties are supported:

ParameterDescriptionRequiredType
pgThe absolute path to where the PostgreSQL binaries like pg_dump and pg_restore are located.yesstring
dumpsThe path relative to .env.json where dumps will be stored.yesstring
serversThe colleciton of servers to operate withyesarray

A server supports following properties:

ParameterDescriptionRequiredType
hostHost of the PostgreSQL Serveryesstring
portPort of the PostgreSQL Serveryesstring
usernameUsername of the PostgreSQL Serveryesstring
passwordPassword of the PostgreSQL Serveryesstring
defaultDbDefault database of the PostgreSQL Server. This will be used to connect to for creating a new database on restore if neccessary.yesstring
secureFlag whether the connection should be secured.noboolean
productionFlag to mark a server as production. Nibbler will ask for confirmation before restoring to this server.noboolean
0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago