Using webcp
As described in the server roles section, there are two webservers for the Museum's Research websites: a "live'', or publicly-available one, and a staging webserver, for prototyping changes to the sites. After changes have been made, viewed, and approved of, the new or altered files must be replicated to the live server and made public. This is what the webcp program is for.
webcp is run from a command line on the staging server. Only users with the privilege of publishing their site are able to run it, and they are able to publish select directories that are under their control. (You do not have to worry about someone else publishing your prototype content to the world.) Sometimes webcp ability is limited to a designated site maintainer, or a senior department member. For information on gaining publishing privileges, please see the section on getting an account.
Invoke webcp with the following syntax:
shell-prompt$ webcp <directory to publish>
or
shell-prompt$ webcp <file to publish>
In this example, <directory to publish> would be a web directory on the server's filesystem, like /srv/www/research/docs. Once you run webcp, you will need to wait until the replication finishes. For large directories where a lot has changed, this could take several minutes.
Here is an example:
shell-prompt$ webcp /srv/www/research/docs/my/site/
... would take files in the staging website http://research-staging.amnh.org/my/site/ and publish them to the live server at http://research.amnh.org/my/site/.
You can also specify a file name instead of a directory. If you only need to publish a single file, this may be a lot faster than publishing the entire directory in which it resides.
If you receive errors that say, "permission denied'' or "send_files failed to open,'' the cause is probably that the directory you wish to copy is not world-readable, and you should investigate its filesystem permissions.





