Shagital / db-dumper

A nodejs package to quickly dumb DB to file. Supports Mysql, PostgreSQL, MongoDB and SQLite
MIT License
5 stars 1 forks source link

hi i want to dump my sqlite3 how can i do it with db-dumper? #1

Open radiorz opened 3 years ago

radiorz commented 3 years ago
radiorz commented 3 years ago

it is not working and throw an error:

node:internal/process/promises:218
          triggerUncaughtException(err, true /* fromPromise */);
          ^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "The dump process failed with exitcode 255 : Error: Command failed: (echo BEGIN IMMEDIATE; & echo .dump) | "sqlite3" --bail 
"D:\xxx\xxx\app\abc.sqlite" > "dump.sql"      
'"sqlite3"' is not recognized as an internal or external command,
operable program or batch file.
".] {
  code: 'ERR_UNHANDLED_REJECTION'
}
[nod
}
radiorz commented 3 years ago

'"sqlite3"' is not recognized as an internal or external command, operable program or batch file.

djunehor commented 3 years ago

Do you have sqlite3 installed i.e npm install sqlite3? Also, please take a look at this https://stackoverflow.com/questions/10388354/sqlite-from-command-prompt-not-recognized-command

radiorz commented 3 years ago

Hello,thanks for your reply. i have installed sqlite3 by yarn :

yarn add sqlite3

and there is a file that is my sqlite3 database (such as xxx.sqlite)

but how can i restore the tables in my sqlite3 database by db-dumper?

djunehor commented 3 years ago

Maybe this can help https://stackoverflow.com/questions/311691/importing-a-sqlite3-dump-back-into-the-database