Transferring observer data with rsync

Background

IMPORTANT NOTE: your data will be available to the observing program PI on the Keck Observatory Archive (KOA) a day or two after the observing run. Therefore, there is no need for you to download your data on your observing night, unless you wish to.

If you would like to download the data during your obseving night, the rsync program is a convenient utility for copying data from the instrument host to your laptop or to a remote machine. You can either pull or push data as explained below.

What Keck computers should you use

Which computer to use depends on the instrument. Some recommendations are:

  • Instrument-specific Linux computers:
    • nirc2.keck.hawaii.edu for NIRC2
    • deimos.keck.hawaii.edu for DEIMOS
    • mosfire.keck.hawaii.edu for MOSFIRE
  • Generic Solaris machines:
    • sshserver1.keck.hawaii.edu
    • sshserver2.keck.hawaii.edu
    • sshserver4.keck.hawaii.edu

Procedures

Pulling to your computer from Keck

This method is appropriate for use on laptops.

  • Open an window on your laptop or remote computer.
  • Gain access through the Keck firewall as required; please consult your Staff Astronomer for details. Note that this is not necessary when you are operating from a laptop connected to the Keck visitor network. This is also not necessary if you are running the Keck remote observing software on your laptop.
  • Issue the rsync command as follows:
    rsync -avz account@keckhost:/path/to/data .
    where:
    • account is the name of the observing account
    • keckhost is the name of the Keck computer. Please note that not all Keck computers can run rsync. Some examples of Keck hosts with rsync installed include the following Sun stations: sshserver1, sshserver3, and sshserver4, and the following Linux computers: deimos, polo and nirc2.
    • When referencing your summit data directory, include a leading /s; for example, /s/sdata1004/deimos8/2020sep10.
  • When prompted, supply the appropriate password for the observing account on the Keck host.

Pushing data from Keck to your computer

This method works best when transferring data to a machine at a remote site, when it would be tedious to log into the remote machine and then gain access through the Keck firewall.

  • Open an xterm window on a Keck computer.
  • Log into one of the headquarters machine listed above, for example:
    ssh sshserver4
  • Issue the rsync command as follows:
    rsync -avz /s/sdataNNN/account/dir user@host:/path/to/data
    where
    • account is the name of the observing account
    • dir is the name of the observing directory
    • user is the username on the remote host
    • host is the remote host name
  • When prompted, supply the appropriate password for the remote user on the remote host.

Examples

  1. Pull data from directory /s/sdata703/esi1/2011jan01 at Keck to the current directory on your laptop computer by issuing this command on the laptop (assuming the laptop is connected to visitor wireless at Keck):
    rsync -avz esi1@sshserver4.keck.hawaii.edu:/s/sdata703/esi1/2011jan01 .
  2. Pull data from directory /s/sdata1001/deimos1/2011jan01 at Keck to directory ~/deimos_data on remote machine foobar.ucolick.org by issuing this command on the remote machine (after gain access through Keck firewall):
    rsync -avz deimos1@sshserver4.keck.hawaii.edu:/s/sdata1001/deimos1/2011jan01 ~/deimos_data
  3. Push data from directory /s/sdata1001/deimos1/2011jan01 at Keck to directory ~/deimos_data on remote machine foobar.ucolick.org by logging into sshserver4 as deimos1 and issuing this command:
    rsync -avz /s/sdata1001/deimos1/2011jan01 wiseguy@foobar.ucolick.org:~/deimos_data

Notes

  • Use the --dry-run option to have rsync print which files will be transferred without actually copying files. Then repeat the command without the --dry-run option to transfer files.
  • Use the --delete option to remove from the destination directory any files which have been deleted from the source directory.

Last modified: 12/18/2020 22:16
Send questions or comments to:

The information on this page is the property of the W. M. Keck Observatory. The contents of this page or any part thereof shall not be copied or otherwise reproduced or transferred to other documents or used or disclosed to others for any purpose other than observing support at the W. M. Keck Observatory and the subsequent analysis and publication of scientific data obtained from observations conducted at the W. M. Keck Observatory. All rights reserved. © W. M. Keck Observatory.