index

LTO Backups

See also tapeutils.

for filesystems

Use dump, restore, and mt from mt-st.

# mt stsetoptions scsi2logical  # figure out /etc/stinit.def
                                # make /dev/tape symlink or use /dev/nst0
                                # or better, set TAPE=
$ cd backup
$ tapebackup
Target is required

Dump these file systems:
  /dev/mapper/volume            (     /) Last dump: Level 6, Date ...

$ tapebackup -7 /dev/mapper/volume

To ignore files

$ chattr +d

To restore

$ restore -i -f /dev/nst0 -b 256

for files with tar

With tar, it will use all the same options

$ tar cf /dev/nst0 -b 512

remote tape access

Uses rmt and expects a few environment variables

$ RMT='/usr/sbin/rmt'
$ RSH='/usr/bin/ssh'
$ TAPE='backup@server.fqdn:/dev/nst0'
$ export RMT RSH TAPE
$ mt-gnu --rsh-command='/usr/bin/ssh' -f user@server.fqdn:/dev/nst0  # can't do everything, use ssh with mt-st for tell
$ dump -i -f user@server.fqdn:/dev/nst0
$ tar ... f user@server.fqdn:/dev/nst0

rmt doesn't support tell, so mt-gnu tell and dump -Q doesn't work as well.

for files with LTFS

# mt stclearoptions scsi2logical
  1. tapemount mounts the tape cartrige based on the RFID chip label to /mnt/$LABEL;
  2. tapeumount will unmount and eject the tape.
  3. mkltfs --device=/dev/nst0 --volume-name=anime --tape-serial=A00008 --no-compression --force lto-cm -f /dev/sg5 -w "anime_A00008"