@pactilis/dbcopy
TypeScript icon, indicating that this package has built-in type declarations

0.5.1 • Public • Published

dbcopy

A node library and command line program to copy data from one sql server database to another

Install

npm install -g @pactilis/dbcopy

Or

yarn global add @pactilis/dbcopy

Usage in command line:

dbcopy --from <fromDb> --database <destDb> --server <dbServer> --user <dbUser> --password <dbPassword>

The tow databases must be of the same structure. The program connect to the destination server only. If the source database is on another server, you need to create a linked server and specify --from [<linked server>].[<source db name>] parameter.

Options

  --help      Show help                                                                [boolean]
  --version   Show version number                                                      [boolean]
  --from      Origin database reference ex. [<linked-server>].[<dbname>] or <dbname>   [string] [required]
  --database  Destination database name                                                [string] [required]
  --server    Server host or ip address                                                [string] [required]
  --user      db server login                                                          [string] [required]
  --password  db server password                                                       [string] [required]

Usage as library

const { dbCopy } = require("@pactilis/dbcopy");

dbcopy({
  config: {
    server: "<server>",
    user: "<user>",
    password: "<password>",
    database: "<destination database name>"
  },
  from: "<source database name>"
}).then(() => console.log("done"))
.catch(err => console.err(err))

Readme

Keywords

none

Package Sidebar

Install

npm i @pactilis/dbcopy

Weekly Downloads

0

Version

0.5.1

License

MIT

Unpacked Size

35.5 kB

Total Files

29

Last publish

Collaborators

  • pierreromaric
  • jspactilis