Console command to copy databases

Following up with Bruce Elgort there is a not documented console command existing which allows the creation of database (replica-) copies. I guess this is a function I was ever longing for.
First of all we need to enable the command in setting the CLUSTER_ADMIN_ON notes.ini variable to 1 submitting

set configuration CLUSTER_ADMIN_ON=1

on the server console. This can be enabled even if the server is not a cluster member.
This setting enables a new command:

CL COPY sourcedb targetdb options

where sourcedb and targetdb are submitted in the format server!!databasename. Optional command options are

replica – to create a replica copy of the database

template to create a template copy (design only) of the database

Be careful when using the command since it does not check if the destination database is already existing and will overwrite the destination without further question.

Thanks Bruce for pointing this out. Looking forward to further updates via the Taking Notes Podcast.

One thought on “Console command to copy databases

Leave a Reply

Your email address will not be published. Required fields are marked *