lsscsi
lists all SCSI devices
/dev/st[0-9]
/dev/nst[0-9]
usefull for writing multiple files to tape one by one
/dev/st0
accessing the first tape device with auto-rewind/dev/nst1
accessing the second tape device without auto-rewind
tar -cvf <tape device name> <path to the data to be written>
-
-c, --create
- Create a new archive.
-
-v, --verbose
- Verbosely list files processed.
-
-f, --file=ARCHIVE
- Use archive file or device ARCHIVE.
tar -tvf <tape device name>
-
-t, --list
- List the contents of an archive.
-
-v, --verbose
- Verbosely list files processed.
-
-f, --file=ARCHIVE
- Use archive file or device ARCHIVE.
tar -xvf <tape device name> -C <path to the data destination>
-
-x, --extract, --get
- Extract files from an archive.
-
-v, --verbose
- Verbosely list files processed.
-
-f, --file=ARCHIVE
- Use archive file or device ARCHIVE.
-
-C, --directory=DIR
- Change to DIR before performing any operations.
tar -cvf /dev/nst0 /tmp
This command writes all data of the /tmp directory to tape device number 1 without auto-rewinding the tape firsttar -tvf /dev/st1
This commond lists the contents of tape device number 2 after auto-rewinding the tapetar -xvf /dev/st0 -C /tmp
This command extracts the contents of tape device number 1 to the /tmp directory after auto-rewinding the tape
mtx -f /dev/sch[0-9] invetory
- -f Device
- Use device Device.
mtx -f /dev/sch[0-9] status
mtx -f /dev/sch[0-9] load <slotnum> <drivenum>
mtx -f /dev/sch[0-9] unload <slotnum> <drivenum>
mtx -f /dev/sch0 load 4 0
uses media changer number 1 to load the tape from slot number 4 into drive number 1mtx -f /dev/sch2 unload 2 3
uses media changer number 3 to unload the tape from drive number 4 into slot number 2