
The easiest way to use the Scientific Image Data Base (SIDB) located at the 3Dgenome project server is to upload or download images one by one, using the hypertext transfer protocol (http). Thus, the image is directly uploaded through the web interface, and filed into the database automatically, with the parameters we set. Downloading filed images is also quite easy.
But some users take a lot of images in one night, and they want to file all (or many) of them into the SIDB. If the number of images is too high, uploading them one by one becomes tiresome.
For these users, an alternative exists that can make filing many images very easy. Downloading multiple files is a similar procedure, but with the steps reverted. We will explain uploading first:
It is a two-step procedure:
Direct transfer from your local disk to the SIDB archive is not possible because extra information is needed that you must provide: the metadata to describe the images. This can be typed manually or reused from templates. Please keep reading.
A special bundle of programs is available to the SILS/3Dgenome users that gathers the necessary binaries to run rsync without using an interface like DeltaCopy. It is basically the ssh_win distribution as available here plus a couple of .bat files to take care of using rsync with the necessary options, and a setup.bat file to help you with the initial configuration (ssh keys and so).
This collection of executables and libraries is intended to provided file synchronization with the 3Dgenome server, with the purpose of uploading and downloading image to the Scientific Image Data Base running there.
It should be already installed in your computer. If not, ask the 3Dgenome project leader for assistance.
Read the instructions in the file 0-README.txt that goes along with that distribution. Run setup.bat and follow the instructions on the screen.
How to proceed after setup.bat:
In the transfer directories (d:\3DgUpload and d:\3DgDownload) you have to create subfolders for the different users using the same login name as in the remote SIDB. Mind the letter case!
Modify 3DgDownload.bat (only that file) to specify your personal remote folder there. Replace USERNAME (twice) after 3DgDownload with yours.
The .bat files expect the transfer directories to be in the disk unit D. Edit as necessary if that is not the case.
Details about these .bat files included below.
To upload the contents of your local transfer directory just run 3DgUpload.bat. Files will be moved to the remote server, to a temporary directory where the SIDB can find them and handle them properly.
A detailed tutorial for step 2 can be found in Sidb Upload To The Archive.
You can always download a single image with the http protocol, but that is again very tedious if you have many of them.
Downloading many files simultaneously is also a two-step procedure: first you place files in your temporary transfer directory on the server, then download them from there to your local computer using rsync.
To download the exported files available in the remote server, run 3DgDownload.bat.
In this section we will gather instructions for troubleshooting as we gain experience with the program usage. You are welcome to edit this article and improve it based on your experience.
The upload script basically runs:
rsync.exe -v -rlt -z -p --remove-sent-files --chmod=ugo=rwX "/cygdrive/d/UPDIR/" "USERNAME@3dgenome.uva.sara.nl:/home/USERNAME/UPDIR/" @pause > nul |
The download script does:
rsync.exe -v -rlt -z -p --remove-sent-files "USERNAME@3dgenome.uva.sara.nl:/home/USERNAME/DOWNDIR/USERNAME" "/cygdrive/d/DOWNDIR/USERNAME" @pause > nul |
The files are deleted from the source after copied to the destination, to prevent duplicated transfers later. In this sense rsync is just used as an effective scp, but not real synchronization is executed (in the sense that there are not two versions of the same file to compare on both sides of the line).
The setup.bat script does:
@echo off echo Creating transfer directories: \UPDIR and \DOWNDIR. mkdir \UPDIR mkdir \DOWNDIR echo. echo Creating \usr\bin to enable scp (in case you need it). mkdir \usr mkdir \usr\bin copy ssh.exe \usr\bin\ echo. echo ************************************************ echo Generating ssh key. Do not enter any passphrase! echo (Just press return to all questions). echo ************************************************ ssh-keygen -t dsa chmod 600 ~/.ssh/id_dsa.pub chmod 600 ~/.ssh/id_dsa cp ~/.ssh/id_dsa.pub . echo. echo ****************************************************************** echo A file named id_dsa.pub should have been copied to this directory. echo Send it to the administrator. echo ****************************************************************** echo. echo (He will just append it to the server ~/.ssh/authotized_keys2, echo you can do it yourself if you know how to). echo When this key exchange is done, you should be able to run echo 3DgUpload.bat without being asked for a password. echo. echo. Press any key to finish pause > nul |
Contact Jose ViƱa.