Skip to content

sakthivel9963/pg_backup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pg_backup

This will backup the postgres function or store procedure or table create script to separate file for each table and function for all the schema or particular schema.

Installation

Using npm:

npm install postgres_backup

Using yarn:

yarn add postgres_backup

Notes

This project will create backup directory at the root of your project folder.

Example

Initialize the pg_backup

const pg_backup = require('postgres_backup');
const pgConfig = {
  databaseName: 'require',
  userName: 'require',
  host: 'require',
  password: 'require',
  schema_name: 'optional',
  port: 'optional',
};
const pgClient = new pg_backup(pgConfig);

NOTE: You can pass the directory name as second argument for the the pg_backup(pgConfig,dirname)

Get the store-procedure or functions:

pgClient.getStoreProcedure();

Get the table structure:

pgClient.getTableStructure();

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published