redwert / pg-dump-restore Goto Github PK
View Code? Open in Web Editor NEWUtility that gives ability to call pg_dump and pg_restore from nodejs.
Utility that gives ability to call pg_dump and pg_restore from nodejs.
Hi @redwert,
Is it possible, that you push a new version with the improvements from yesterday to NPM?
Thanks!
First of all, thank you for your contribution.
I am using strapi, which from what I have seen uses knex as orm, I would like to know how I can use it with knex instead of sequelize.
I encountered an error when attempting to use the pg-dump-restore
library to dump a PostgreSQL database. The process fails with an ENOENT
error for the pg_dump
command.
{
'full error :>> ': Error: Command failed with ENOENT: pg_dump --dbname=postgresql://postgres:sudo@localhost:5432/testeprod --format=custom --file=./dump.sql
spawn pg_dump ENOENT
at __node_internal_captureLargerStackTrace (node:internal/errors:496:5)
at __node_internal_errnoException (node:internal/errors:623:12)
at ChildProcess._handle.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:476:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -2,
code: 'ENOENT',
syscall: 'spawn pg_dump',
path: 'pg_dump',
spawnargs: [
'--dbname=postgresql://postgres:sudo@localhost:5432/testeprod',
'--format=custom',
'--file=./dump.sql'
],
originalMessage: 'spawn pg_dump ENOENT',
shortMessage: 'Command failed with ENOENT: pg_dump --dbname=postgresql://postgres:sudo@localhost:5432/testeprod --format=custom --file=./dump.sql\n' +
'spawn pg_dump ENOENT',
command: 'pg_dump --dbname=postgresql://postgres:sudo@localhost:5432/testeprod --format=custom --file=./dump.sql',
escapedCommand: 'pg_dump "--dbname=postgresql://postgres:sudo@localhost:5432/testeprod" "--format=custom" "--file=./dump.sql"',
exitCode: undefined,
signal: undefined,
signalDescription: undefined,
stdout: '',
stderr: '',
failed: true,
timedOut: false,
isCanceled: false,
killed: false
}
}
pg-dump-restore
via yarn.The library should successfully initiate a dump of the specified PostgreSQL database using pg_dump
.
The command fails with an ENOENT
error, indicating that pg_dump
could not be found or executed.
Hi, I hope you have a nice day. I have made a pull request that extends the ability to exlude table data pattershttps://github.com/redwert/pg-dump-restore/pull/9, so since it was approved, i was wondering if these changes were released, because I made a npm of this package and it doesn't have them. Thank you for any help you can offer me.
Hi, I am trying to use tablePattern
option
Example table names I'm trying to match [ UserManagementSystem, UserLoginSystem, UserSessionSystem ]
what I have tried is tablePattern="User*"
but no match is found
pg_dump: error: no matching tables were found
or
how to achieve something like pg_dump myDatabase -t table1 -t table2 > backup.sql;
Any help appreciated
if your password is %, then before passing the password to the library the password has to be encoded to %25. It would be nice to either fix it, or at least show a warning in the documentation
I am trying to use this in google cloud run which mounts database connection as unix socket
It would be great if the wrapper supports custom unix socket
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.