Bruce Elgort

How to copy files from one Domino server to another
Wednesday, March 21st, 2007
Recently I needed to make "copies" of some Lotus Notes databases and didn't want to do it from my Notes client. This would have take hours considering the database was 5gb. I knew that there had to be a way to do this and thanks to the assistance of my friend Thomas Gumz, I was able to issue a command line from the Domino server console and presto, the database was instantly copied. Yes, it's not documented nor supported, but has been around for a long time, at least since V4 according to Thomas.

So let's look at what you need to do to enable this feature:

The server console commands are turned off by default, you need to first enable them:

Set this server notes.ini variable, like so:

> set config CLUSTER_ADMIN_ON=1 (even if the server is not a in cluster, doesn't matter).

No need to restart the server, it becomes active immediately.

This enables this new command:

CL COPY sourcedb targetdb

Examples for the CL COPY command:

> CL copy serverA!!db1.nsf serverB!!db2.nsf
This would create a regular non-replica copy of db1.nsf on serverA as db2.nsf on ServerB

> CL copy serverA!!db1.nsf serverB!!db2.nsf REPLICA
This would create a replica copy of db1.nsf on serverA as db2.nsf on ServerB

> CL copy serverA!!db1.nsf serverB!!db2.nsf TEMPLATE
This would create a template copy (only design, no data) of db1.nsf on serverA as db2.nsf on ServerB

> CL copy db1.nsf db2.nsf
This would create a regular non-replica copy of db1.nsf as db2.nsf on the same local server



 
Comments

Comment posted by Tim Tripcony03/21/2007 11:12:20 AM
Homepage: http://www.timtripcony.com


Thanks, Bruce! I have to do this all the time, and I usually use LotusScript to create a new replica, then use an API call to assign the new replica its own replica ID (making it a copy of the original), but you're right - it takes forever. These commands will be a huge time-saver.


Comment posted by Rob McDonagh03/21/2007 12:13:06 PM
Homepage: http://www.CaptainOblivious.com


Nice! That's awesome. Thank Thomas for us.


Comment posted by Vince Schuurman03/21/2007 12:13:14 PM
Homepage: http://blog.vinceschuurman.com


This is really powerfull stuff, I have often cursed the fact I couldn't copy a database in the background (backups)


Comment posted by Greg Walrath03/21/2007 12:25:54 PM
Homepage: http://www.univarusa.com/


That is cool! Do you know if it works with wildcards; e.g., copying an entire directory from one server to another?


Comment posted by Manfred Dillmann03/21/2007 02:53:42 PM
Homepage: http://www.madicon.de


Hi Bruce,

great tip! Thanks for sharing it. I have translated it to German and put it on the "Tipps und Tricks" area of my website.

http://www.madicon.de/notesdomino/tippstricks/index_files/0000168.php

Kind regards,
Manfred


Comment posted by Jerry Glover03/21/2007 04:02:26 PM
Homepage: http://www.jerryglover.com


Great tip Bruce! This is going to come in handy for bringing up a couple of servers in the near future.


Comment posted by Oliver Regelmann03/21/2007 04:14:35 PM
Homepage: http://www.n-komm.de/blog


Wow, how cool is that? Thank you!


Comment posted by Giuseppe Grasso03/21/2007 04:18:19 PM
Homepage: http://www.dominopoint.it


like Manfred I translated it to Italian under the "Tips Admin" section here:
http://www.dominopoint.it/Dominopoint/dominopoint_blog.nsf/dx/Come_copiare_files_da_un_server_Lotus_Domino_ad_un_altro
thanks for this great tip!



Comment posted by Gregg Eldred03/21/2007 04:54:21 PM
Homepage: http://www.ns-tech.com/blog/geldred.nsf


This tip rocks! Like others before me, I have posted it elsewhere, on an internal wiki I maintain. And yes, Bruce, I am using DominoWiki,


Comment posted by Lars Berntrop-Bos03/21/2007 05:29:14 PM


Wow.

This is so useful!

Thank you for sharing, Bruce!

Cheers,

Lars


Comment posted by Chris Linfoot03/22/2007 03:21:02 AM
Homepage: http://chris-linfoot.net


Replacing a server recently. I just used the admin client to create administration requests to create new replicas of all of the databases on the target server. Worked very well, but your method is very nice too.


Comment posted by jean-yves riverin 03/22/2007 08:41:42 AM


Hi,

It's working on a 6.5.4FP3 HF82 server, but it doesn't on 6.5.4FP1
The requested function is not supported by the software on this server.

JYR


Comment posted by Thomas Gumz03/22/2007 11:39:27 AM
Homepage: http://www.thomasgumz.net


JYR,

if you don't >set config CLUSTER_ADMIN_ON=1, you'll receive that error
"The requested function is not supported by the software on this server."


Comment posted by Yusuke Murakami03/23/2007 02:47:04 AM
Homepage: http://domblogjp.blogspot.com/


Thanks for the info. I happened to find that this CL command also has a delete option.
CL delete dbname


Comment posted by Dennis Meyer03/26/2007 09:11:38 PM


Bruce, thanks for this! Saved me a lot of work tonight. Three weeks ago, I spent way too much time copying dbs over VPN. I was dreading repeating it for similar work tonight. Did a search on the off chance I'd find a better way. Sure enough, you came through! Again, thanks.


Comment posted by David Taig03/29/2007 08:17:00 AM


This is the best tip for 2007. At Lotusphere 2006, I spoke to the AdminP Developer requesting a process to create a 'copy of a database' and he was not keen to add this feature into the product. Well Thomas comes up trumps again.


Comment posted by Brian Benson03/29/2007 09:07:27 AM
Homepage: http://www.helpsoft.com


Very nice.


Comment posted by Martin Selecky04/06/2007 09:12:56 AM


wau, thanks
I was just browsing around, and found this

It remaind me. Is there any way how to send email via domino console?
I am starting to believe

martin


Comment posted by Michael Urspringer04/10/2007 03:12:35 AM
Homepage: http://www.urspringer.de


Thanks Bruce for that powerful tip! I am an administrator for so a long time but this was still new for me!


Comment posted by booyaa04/18/2007 11:01:26 PM
Homepage: http://booyaa.org


Cheers Bruce! This one save my skin last night!


Comment posted by Jason Freis04/20/2007 01:05:47 PM


Heard you mention this on the Taking Notes podcast a while back, but really needed it today (5GB db from one server to another). Many Thanks to you and Thomas Gumz


Comment posted by Jerry IOber04/24/2007 03:56:23 AM


Way to go Bruce! Great Tip!


Comment posted by Brian Green05/30/2007 07:05:20 PM


Thanks Bruce! Just what I needed! Here's some additional info. You can specify the server's IP address instead of the name. This helps if your server's name contains a space. Also, the calling server must be allowed to create databases/replicas on the other server. This permission is granted in the "Server document" in the Domino Directory.


Comment posted by Dan Mulligan06/28/2007 05:48:36 AM
Homepage: http://www.nba.com


Cool tip this will help alot with moving databases around.

Thanks!


Comment posted by werz@werz.at07/14/2007 12:02:39 AM
Homepage: http://www.bfi-sbg.at


this does not seem to work with version 7.02 !?
regards
werner


Comment posted by 07/18/2007 12:10:10 AM


I tried with above instruction. But it is not not working my end...
When i tried it in my command prompt. It gives me the below given error.
'CL' is not recognized as an intenal or External command, operable program or batch file.
Please help me...


Thanks in Advance!!
Shivanshu


Comment posted by Wayne07/19/2007 10:40:13 AM


Awesome!!


Comment posted by Laszlo Nemes07/24/2007 01:33:04 AM


I also say that it is a VERY USEFUL tip. Thaks for that.

I confirm that "CL COPY" worked well (within same server) on Domino 7.0.2


Comment posted by Ted Thomas08/09/2007 02:38:12 PM
Homepage: http://www.eTGVirtual.com/


This works, folks, and it is very powerful. I'm using it to copy and delete things on the same server. Thanks Bruce!

I can see why it is undocumented and unsupported. You don't get the adminp documentation of what you have done (though command lines go in the logs, of course) and with a few wild cards thrown in I bet you could essentially gut the server in a matter of seconds. Also, two "copy" commands running at once will bring a PC server to it's knees-- be careful!

Ted T.


Comment posted by Scott Edwards10/09/2007 09:17:01 PM


That Rocks!


Comment posted by 10/18/2007 09:26:28 AM


Great tip! Using it now.


Comment posted by Greg Lee10/18/2007 09:44:52 AM


Great tip! Using it now.


Comment posted by Fabien02/02/2008 03:17:45 PM


ADDED TO NOTES.INI
TEST
-----

> CL copy
The requested function is not supported by the software on this server.

> CL copy log.nsf log.nsf2
The requested function is not supported by the software on this server.

> CL copy log.nsf log.nsf2
The requested function is not supported by the software on this server.

> restart server
02/02/2008 23:57:54 Starting Server shutdown
02/02/2008 23:57:54 Schedule Manager shutdown complete
02/02/2008 23:57:54 AMgr: Executive '1' shutting down
02/02/2008 23:57:55 MT Collector: Shutdown
02/02/2008 23:57:55 SMTP Server: Waiting for all tasks to complete
02/02/2008 23:57:55 Router: Shutdown is in progress
02/02/2008 23:57:55 Calendar Connector shutdown
02/02/2008 23:57:56 Agent Manager shutdown complete
02/02/2008 23:57:56 Database Replicator shutdown
02/02/2008 23:57:58 Index update process shutdown
02/02/2008 23:58:01 Administration Process shutdown
02/02/2008 23:58:04 SMTP Server: All tasks have completed
02/02/2008 23:58:05 Mail Router shutdown
02/02/2008 23:58:06 Event Monitor shutdown
02/02/2008 23:58:06 SMTP Server: Shutdown
02/02/2008 23:58:13 Stats agent shutdown
02/02/2008 23:58:16 Server shutdown complete. Server will restart in 10 seconds...

AFTER A REBOOT ITS OK
No special output after the command.


> sh serv

Lotus Domino (r) Server (Release 6.5.1 for Windows/32) 03/02/2008 00:14:52


Comment posted by Susan Lynch03/25/2008 09:21:30 AM


Really fantastic - Thank You!
Need help please with copying a file where the directory contains a space! Anyone know the correct sytax?
If so could you please post and email me at susan.lynch@cgi.com
Thank you!!!


Comment posted by Thomas Gumz03/25/2008 01:46:40 PM
Homepage: http://www.thomasgumz.net


Did you try "double quotes" around the path containing the spaces?


Comment posted by Susan Lynch03/26/2008 10:08:40 AM


Yes, it does't work with double quotes, single quotes... To work around this I can move the files first to a directory with no spaces, and then do the copy. If there are spaces or quotes, the error message is "The requested function is not supported by the software on this server." I would still very much appreciate the correct syntax to copy for example a file from the directory Dir1\Help Desk\db1.nsf


Comment posted by Susan Lynch03/26/2008 12:11:17 PM


Just wanted to say thank you again! To describe how good this command is and how much time it saved, I first copied a 1.2 GB file with File, Database, New Copy. I was on a VPN and it was taking forever, the total time would have been 7 hours! Then I wrote a script to run as a scheduled agent (to allow the server to copy from server to server) and that reduced the time to 3+ hours. With the CL Copy command, I copied a 2 GB in 18 minutes!!! WOW!!!


Comment posted by Susan Lynch03/26/2008 12:12:33 PM


Just wanted to say thank you again! To describe how good this command is and how much time it saved, I first copied a 1.2 GB file with File, Database, New Copy. I was on a VPN and it was taking forever, the total time would have been 7 hours! Then I wrote a script to run as a scheduled agent (to allow the server to copy from server to server) and that reduced the time to 3+ hours. With the CL Copy command, I copied a 2 GB in 18 minutes!!! WOW!!!


Comment posted by tony06/27/2008 06:10:29 AM
Homepage: http://gaxgame.com


thanks for your tips, very helpful


Add Your Comments



Email addresses provided are not made available on this site.





You can use UUB Code in your posts.

[b]bold[/b]  [i]italic[/i]  [u]underline[/u]  [s]strikethrough[/s]

URL's will be automatically converted to Links


:grin: :-D :-\ :-o :angry: :cool: :-p :emb: :cry: :huh: :-x :rolleyes: :-) :laugh: :-( ;-)






Remember me    



Bruce Elgort







Contact Bruce