0.5.1 • Published 3 years ago

@pactilis/dbcopy v0.5.1

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

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))
0.5.1

3 years ago

0.5.0

3 years ago

0.4.0

3 years ago

0.3.0

3 years ago

0.2.0

3 years ago

1.0.0

3 years ago