You are here

jget

Name
jget  - read files from tape

Syntax  
jget [options] stub dest
jget [options] stub1 stub2 ... dir
jget -m [options] stub1 dest1 stub2 dest2 ...
jget -r [options] stub-prefix local-prefix stub1 stub2 ...

Description
Fetch one or more files from the Jefferson Lab mass storage system tape library.  Use -m to designate a specific destination for each retrieved file.  Use -r to direct retrieved files to local files replacing stub-prefix with local-prefix.

If more than one path is specified, the last path designates the destination directory.  If dest is a directory, then a file will created within it having the same name as the stub file.  If dest is not a directory and doesn't already exist, then a file will be created with that exact path.

The destination directory must exist and the user must have write permission, otherwise jget will fail with an error message.  Note that output files are created before a jasmine request is generated in order to test write permissions.  If the command fails, those zero-length files may not be successfully cleaned up.

Options
  -n
    Print request id and exit after submitting (destination files must specify a central network filesystem).

  -u user
    Run as a specified user (e.g. -u bob).  Only certain users are authorized to run in this mode.

  -m
    File names alternately designate stub path, destination file path

  -r  local-prefix stub-prefix
    Create files with local-prefix in lieu of stub-prefix.

Examples

 

In normal usage, the last path indicates a destination directory in a locally accessible file system and the other paths indicate files stored on tape and organized within the /mss stub directory. For example:

 

jget /mss/stub1 /mss/stub2 ... dir

As with jput, you can specify multiple files and multiple destination directories, using either the -m option or the -r option. The -m option allows you to alternately specify source file and destination directory as follows:

jget -m /mss/stub1 dir1 /mss/stub2 dir2 ...

Alternative, you could use the -r option to specify a path prefix that you wish to replace. For example, you could list a whole bunch of files under a particular stub directory that you wish to appear in the same structure under a local directory, as follows:

jget -r /mss/super/special/work /tmp/work /mss/super/special/work/file1 /mss/super/special/work/dir1/file2 ...

In this example, the files will be retrieved to the local directory with the path prefix "/tmp/work" in lieu of the stub directory prefix "/mss/super/special/work".

Behavior

 

When run with -n, the command will simply print out the request identifier and exit.  Otherwise, the output is as follows.

 

Status messages are printed to standard output as the files move through the various stages of processing. The command will not exit until all jobs have reached a terminal state unless some serious error arises that cannot be properly handled.

Standard output consists first of the line

Submitted request <request-index>

followed by status update messages in the form

<job-index> <job-state> <local-path> <mss-path>

with one line for each status update for each file.

Note that any non-status update such as a warning or error will be preceded with one of the tags: WARN, ERROR, FATAL