Triple -B
Triple -B

Reputation: 271

PostgreSQL table backup from node.js(express)

How to create full Postgresql database backup and separated table from node.js (express/loopback)? I didn't find any solution to sole it... Any information... I'm interested in sql dump, because there are 2 "big" tables (~40.00. raws / ~ 30 columns) and several tables-dictionary.

Upvotes: 0

Views: 1883

Answers (1)

machineghost
machineghost

Reputation: 35725

A simple answer, although maybe not what you're looking for: you can make a package.json script which uses shell commands (including the PostgreSQL built-in pg_dump):

"backup-db": "pg_dump YourDatabaseName | gzip > backups/database_backup.`date +%m-%d-%Y-%H-%M`.gz",

Upvotes: 1

Related Questions