Click here to jump to Nash!Com Solutions Homepage - Click here to request a test version.
Database Copy
Version: 1.2c
Shortname: nshdbcp
Category: Command-Line Tool
Nash!Com Database Copy is a command-line tool for creating replicas or copies of multiple databases even on remote servers.
This program can be used on clients or servers (server console).
- create copies of databases
- create replicas of databases
- create databases on remote servers
* | NshDbCp 1.2d - Notes Database Copy
|\| (c)1999-2001 NashCom - Daniel Nashed Communication Systems
| * mailto:info@nashcom.de - http://www.nashcom.de
Syntax: nshdbcp <database(s)> [-f<filename>]
Database Selection Options:
-r : process directories recursively
-s<servername> : server name
-t<servername> : target server name
-g<directory> : target directory
Output Options:
-o<outfile> : output file
-m<mailuser> : send report to
-k[0,1] : override client/sever: k1=client, k0=server
Actions:
-c : create copy
-p : create replica
-x<prefix-str> : exchange template names and add prefix
-y : force create (even if already exists)
Nash!Com Database Copy helps to create replicas or copies of databases.
If the user/server executing this program has sufficient rights on a remote server also databases on remote servers can be created.
It helps creating replicas on remote servers for a bunch of databases or e.g. to create a test environment copying some productive databases.
-- Action to perform --
The following actions are currently supported
( -p ) Create replica
creates replica of selected databases. You need to specify a target server using "-t" or specify a target directory using "-g" option.
Examples:
nshdbcp *.nsf -tnotes-acme-dus-01-p
Creates replicas of all databases in Notes root directory on notes-acme-dus-01
( -c ) Create database copies
creates a database copy of selected databases. You need to specify a target server using "-t" or specify a target directory using "-g" option.
Examples:
nshdbcp *.ntf -gntf-folder -c
Creates copies of all templates in ntf-folder
( -t ) Specifying target server
This option is used to set the target server for database copies or replicas
( -g ) Specifying target directory
This option is used to set the target directory for database copies or replicas.
Make sure filenames are unique when copying database recursively.
You get a warning message that databases cannot be overwritten unless you specify the force option (-y).
( -y ) Force to create databases
This option forces databases to be created even if they already exist.
( -x ) Exchange Template Name and add Prefix
This option is extremly useful if you need to create intermediate templates for example for Lotus standard templates.
If you want to create a new copy of a template and keep updates from the original template while setting a new design/template name this option might help.
You just need to specify a prefix for the new template name and this option will change the template names for you.
Example:
Filename | Database is a template | Inherit design from tempalte |
ntf/lotus/mail50.ntf | StdR50Mail |  |
ntf/acme/mail50.ntf | Acme_StdR50Mail | StdR50Mail |
mail/jdoe.nsf |  | Acme_StdR50Mail |
nshdbcp ntf/lotus/*.ntf -gntf/acme -c -x"Acme_"
What happens if no flags are used?
If you do not use one of the action flags, the databases are only listed.
You could use this feature to check if your selection is OK or to create a file that you can modify and use via -f option
-- Ways to select databases --
1. specify a database name in the command line
2. specify a list of databases listed in a file via option -f
3. use wildcards (* and ?) for specifying databases and templates including subdirectories if using the ( -r ) option
4. specify a remote server name ( -s ) where to search for databases
you can combine any listed ways
Some examples:
1. specify a database name in the command line
Example:
nshdbcp mydb.nsf
runs on mydb.nsf
2. specify a list of databases in a file via option -f
Example:
nshdbcp mydb.nsf -fdb.txt
runs on mydb.nsf and all databases listed in db.txt
db.txt should contain databases including full path like
names.nsf
mail/jdoe.nsf
info/acme.nsf
3. use wildcards for specifying databases and templates including subdirectories if using the ( -r ) option
Example:
nshdbcp mail/*test*.nsf
runs on all databases that meet the selection within the mail subdirectory
e.g. mail/dus-test.nsf but not mail/dus/old/test.nsf
If you want to include subdiretories use the -r switch.
As soon you have multiple wildcards in different directories you need to use the recurse subdirectory switch
Example:
nshdbcp mail/test?/*.nsf -r
this does match e.g. mail/test1/jdoe.nsf
but also matches mail/test2/hilden/acme.nsf because this does also match the pattern.
4. specify a remote server name ( -s ) where to search for databases
-s Option defines the server where databases are searched
Example
nshdbcp -snotes-acme-01 mail/*.nsf
runs on databases (.nsf files) in directory mail on notes-acme-01
nshdbcp mail/test??xxx*.nsf
runs on databases (.nsf files) that match the pattern "/mail/test??xxx*.nsf"
-- Output options --
In case you want to redirect output you have the following options
( -o ) Redirect output to file
Writes output to a the file specified.
Example: nshdbcp mydb.nsf -ooutfile.txt
writes output to outfile.txt
Comment: this option might help to create a list of databases that can be modified and uses as input for "-f" option.
( -m ) Send output via mail
Sends output to the specified user.
Example: nshdbcp mydb.nsf -m"John Doe"
sends output to John Doe
( -k ) Overwriting Client/Server Settings
Nash!Com Command Line Tools run on Servers or Clients.
However in some cases and environments it can not determine if running on server or as client program using server environment.
Therefore you can override the default settings using this option.
Server and Client functionality does only differ in the way output is logged.
Installation Instructions
- copy into Notes exe directory
- run from command line or server console
and make sure notes.ini can be found in the directory or is in the path