To simplify life for observers, we have developed a tool called
autobackup to copy observer data to CD or DVD media.
There are two main components: a Tcl/Tk GUI called
autobackup.tcl, and a csh script called
The Autobackup GUI is targeted directly at observers
wishing to back up raw Keck data from their "/sdata" disk or disks.
- Do NOT bring blank CDs or DVDs to Keck to use
with the CD/DVD autoloaders. We provide the media.
- DO bring jewel cases or sleeves to hold your
CDs or DVDs. We do not provide those.
We currently have two autoloaders at Keck.These machines hold up to 120 blank
disks, either CD-R or DVD-R disks, and can automatically burn and label data
onto one or more of these disks. There is one each in Remote Ops 1 & 2.
All observer data backups are done using the autoloader in Remote Ops 1.
The autobackup.tcl GUI is shown below.
- Type "autobackup.tcl" in any local xterm or select it from the instrument desktop menu.
- This will launch the autobackup tkl/tk GUI.
- The GUI checks your user name and looks for the INSTRUMENT environment
variable (envar). For example, if you are logged on as "esieng", that
would be your user name and "esi" would be the value of the INSTRUMENT
- The GUI then searches the data disks for directories owned by "esieng."
(Specifically, it looks for directories of the form "/sdata*/esieng/*".)
It then goes through this list and discards any that are empty. Note that in
the example shown in the figure, two directories were found.
- The GUI then presents a list of the directories it has found, with check boxes
next to each one. After each directory is an estimate of the amount of data
in that directory (calculated using the "du" command). Note that you
may have some older directories as well as your own. These are probably leftovers
from a previous observer. In the case of instruments that are run from
a single master account (NIRC and NIRSPEC), you will likely see a lot of directories.
Note that one of the directories above says it contains "0 MB". This
directory contains only a couple of subdirectories, and no real data.
- Select your directories - Click the checkboxes at the left of your listed directories
to mark all your data directories for backup.
- Select Number of copies - Check the 1, 2, or 3 copies options. All copies
will be labeled identically.
- Select Compression - select yes to gzip your data before writing to disk or no to not compress your data. Even on binary FITS files, the "gzip" compression
routine can substantially reduce the size of the files. You may select this
option if you are trying to fit large data sets onto the smallest
possible number of disks. Realize, however, that compression will take some
significant amount of extra time.
Total space - Written to the right of the label is the total space used by all of the directories
you have selected above. If you have compression selected, this number is
only an estimate (simply half of the uncompressed space).
Select the type of disk - A CD will hold 650 MB of data, while a DVD-R disk
will hold up to 4.5 GB. (We are somewhat conservative about the disk capacities
to avoid disk overruns.)
Make sure you have an appropriate DVD reader at home
if you choose DVDs!
Enter text fields - Text for disk label. Four lines of text can be put on the disk(s) as a label.
By default three of these lines are already filled in, but you can change
any of the text. The size of the text boxes is a rough indication of how much
text will fit onto the disk. You can put in more text, but some of it may
end up off the edge of the disk. The text will be centered on the disk, not
left-justified as in the GUI boxes.
Click "Write" Button - Write the data. The GUI will pass the information on to the shell script, autobackup.csh.
In principle, you should be able to go to sleep or do other work while the computer
and the autoloader do their thing. If your data will not fit onto one disk, it will automatically be
partitioned into disk-sized chunks, and each disk will have another line in
the label, saying, e.g., "Disk 1 of 5". Note that this is not
"Copy 1"! If you are making three copies of data that fits on five
disks, there will be three identical disks reading "Disk 1 or 5",
three more labeled "Disk 2 of 5", etc.
The data backup is now in the hands of the shell script, autobackup.csh. The GUI will dissapear
and a new xterm will indicate the progress of the data backup. When autobackup.csh has finished,
it will pause with a message telling you it is done printed inside the xterm, and waiting for you
to hit . The xterm will dissapear, and the GUI will pop up again and allow you to burn
more disks, change options, etc. If you are done with the GUI, hitting QUIT will kill it.
autobackup.csh dir1 dir2 dir3 [-n #] [-dvd] [-gzip] [-labelFile filename]
In general these options can be in any order, as long as the values of the
"-n" and "-labelFile" options follow these options immediately.
- dir1 dir2 dir3 ...
A list of directories (full pathnames highly recommended!) to write to disk.
Everything within these directories, and nothing outside them, will be written.
Note that if more than one directory is requested, the program will have to
copy all of the directories into a single umbrella directory. While this takes
more time, it should be transparent to the user.
- -n #
Specifies the number of coopies to make. There is in principle no limit to
this, although of course if you exceed the number of blank disks currently
loaded in the autoloader you can expect problems! The autobackup.tcl GUI currently
only has options for 1, 2, or 3 copies.
Specifies writing to DVD-R disks.
Specifies compression using the fastest gzip compression. (Tests on LRIS-B
and DEIMOS images showed that higher levels of compression took longer but
made almost no difference in the final file sizes.)
- -labelFile filename
Specifies a file containing text to incorporate into the label. When using
autobackup.tcl this text is the same as the text in the boxes at the bottom
of the GUI.
- If no label file has been specified, a default one is provided.
- If there is either more than one directory, or you are using compression,
a scratch disk will be found and a staging directory created.
- If you have requested compression, the data files are compressed into the
staging directory. Any subdirectory structure is retained.
- The data path and options are then sent to the command "data2auto2,"
which will partition the data into disk-sized chunks if neceesary, and burn
and label the disks.
- Any temporary staging directories and files are cleaned up.
The disks can be found in either bin 2 or bin 3 of the autoloader in Remote Ops 2. Feel free
to rotate the black carousel containing the disks with your hand, but be extremely
careful. If the autoloader tries to access the carousel while you are touching
it, the carousel may spin around and cause some injury. You may have to pull
out a stack of recently written disks to find yours. Other users may also have
been backing up to the autoloader. Please handle all disks carefully, and return
any disks you don't own to the carousel or to a CD/DVD spindle next to the autoloader.
Conversely, if you see a spindle next to the autoloader, you should check there
first for your disks. Someone else may have already gone through the output
Bring your own jewel cases, CD/DVD sleeves, or some other means
of protecting your disks when you take them home.