...
Specific taks
- We use these file variables to provide some examples. The variables are optional. You can use your filenames directly. Please note that the variable for several files have to formatted differently, depending on the preferred access method.
- single file
- F=/hs/store/users/2023/2023-11-30_liegmahl/home_edvs1.tgz
- directories
- D="/hs/store/users/2023/2023-11-30_liegmahl"
- multiple files:
- DIR="store/users/2023/2023-11-30_liegmahl" # Note: no "/hs" here!
FA="/hs/$DIR/*"
FC='"$DIR/home_edvs1.tgz","$DIR/isibhv_personal.tgz","$DIR/isipd_home_pd.tgz"' # Note: "/hs/" is missing here!
- single file
- Some additional tasks can be done with ssh hssrv2 saminfo.sh
...
- Single File
- F=/hs/store/users/2023/2023-11-30_liegmahl/home_edvs1.tgz
If you have special characters (e.g., spaces, brackets, ...) in your filename: Try to avoid them. Yes, really try to avoid then! However, if are forced to use special characters it will get nasty. You have
- Single File
...
have to quote the filename and/or
...
protect the special characters and in the filename: F="/hs/platforms/WORM/aircraft/polar6/macs/exdata/P6-244_ANT_23_24_2311300801/20231130-150529_[Record\ All]/111498_RGB/09835_041255631_500.macs".
...
and in addition to quote the ssh command correctly (see example)
...
- Directories
- D="/hs/store/users/2023/2023-11-30_liegmahl"
- Directories
...
- Multiple Files (for saminfo.sh):
- Create a file containing all files you want to process: FL=<contains-one-file-per-line.txt> (one file per line)
- Copy the file to a specific hssrv2 server, e.g. hssrv2a: rsync $FL hssrv2a:/tmp/$FL (Hint: If $FL is located in your $HOME, there is no need to upload it )
- execute ssh hssrv2a saminfo.sh <option> -F/tmp/$FL (see examles below)
- Multiple Files (for RestAPI):
- DIR="store/users/2023/2023-11-30_liegmahl" # Note: no "/hs" here!
FC='"$DIR/home_edvs1.tgz","$DIR/isibhv_personal.tgz","$DIR/isipd_home_pd.tgz"'
- Some additional tasks can be done with ssh hssrv2 saminfo.sh
Access method & Task | RestAPI | ssh hssrv | ssh hssrv 'saminfo.sh ...' |
---|---|---|---|
filestat (everything) | eval $CURL -X GET $SERV/file?path="$F" eval $CURL -X PUT --data \'{\"path\":[$FC]}\' $SERV/batchfile | sls -D $F $F # use -E to show | ssh hssrv2 'saminfo.sh -ga -f'"$F" |
filestat (online/offline) | eval $CURL -X GET $SERV/file?path="$F" | jq -r .onlineblocks eval $CURL -X PUT --data \'{\"path\":[$FC]}\' $SERV/batchfile | jq -r '.infos[] | {path, onlineblocks, error}' | ssh hssrv2 'saminfo.sh -go -f "$F"' | |
staging | eval $CURL -X POST $SERV/request/stage?path="$F" eval $CURL -X PUT --data \'{\"path\":[$FC]}\' $SERV/request/batchstage | These won't work. Please use saminfo.sh instead | ssh hssrv2 'saminfo.sh -s -f'"$F" |
show scheduler state | eval $CURL -X GET $SERV/queues | -- | ssh hssrv2 saminfo.sh -S |
|
| ||
mkdir | -- | mkdir/hs/projects/<project>/newdir | -- |
release | release $F |
| |
quota |
| ssh hssrv2 saminfo.sh -q | |
|
|