HOWTO archive files to the tape library
From GlueXWiki
The first script is an example of archiving files to the tape library. This script assumes
- you are logged into an ifarm machine
- there is a local directory called
test
- that directory contains a set of files (and perhaps other directories) that should be archived
- that the archive should be stored in the user's home directory in the tape library "directory" structure
The directory is tar'ed up and archived.
#!/bin/sh username=marki mssdir=/mss/home/$username/testdir/ directory=test #### tar zcvf $directory.tar.gz $directory jput $directory.tar.gz $mssdir exit
Notes:
- You must wait for the jput to exit before closing the shell session. If the jput is ended before completion, the transfer to the tape library will be cancelled.
- The jput may take a while. You are getting into a queue with all of the other tape users.
The next script restores the files saved in the previous example.
#!/bin/sh username=marki mssdir=/mss/home/$username/testdir/ directory=test #### jget $mssdir/$directory.tar.gz $directory.tar.gz tar zxvf $directory.tar.gz exit
Notes:
- The restored
test
directory will appear in the local directory. - Again patience is required.
To see the status of any tape request (jput or jget) use the jtstat
command.