So, I have a tape drive, and use it to permanently archive some stuff (old projects). These are "copy once" things, no versioning/incremental backups/etc. Though of course, new projects might be added to a tape later on.
I use tar for this (GNU tar 1.29 on Ubuntu 18.04):
tar --create --verbose --verbose --blocking-factor=128 --checkpoint=10000
--checkpoint-action="echo=[%{%F %T}t] [%s] #%u: %T" --format=posix
--label="`date -Iseconds`" --totals --multi-volume --file=/dev/nst0 <Folders to backup>
Since this leaves me with a bunch of tapes that I have to manually keep track of, I wonder if there are common tools to catalogue those tapes, and maybe even keep track of stuff like the blocking factor, etc.
I know I can manually run a tar --list
into a file and keep notes, which is my current approach, but before I start off wrong, I figure I ask.
I am not looking at "big" programs like bacula/bareos and the like, mainly because I want to be able to restore with just the tape in hand and a brand new *NIX system. With tar, I know that I can just scan every tape to find what I need in an emergency. (But I'd like to avoid that, hence the question)
gtar
usage sincegtar
is known to reject follow up tapes from multi volume archives with a probability of ~ 5%. Also note that your command happily archives long pathnames that gnu tar later rejects to restore. Did you think about whether you really like to usegtar
for backups?tar --show-defaults
says it's using gnu format by default, which is documented to have incompatible extensions. I was hoping that by using POSIX.1-2001, I get a broad compatibility with different systems (while also supporting large files). Do you recommend something else that runs on Linux (and optionally, BSD)?star
that is recent inschilytools
. If you like to verify thatgtar
does not support long pathnames, try to extract the filestar/testscripts/longpath.tar.bz2
usingstar
andgtar
.star
doesn't support multi-volume archives in pax format - is that a limitation of the pax standard? The output (along with -block-number) is pretty good for my cataloging needs, so that's neat. experimenting with this command line for now:star -c artype=xstar -block-number blocks=128 file=/dev/st0 -fifo -fifostats fs=1g -multivol -time -v -v VOLHDR="``date -Iseconds``" <Folders>
pax
format is strictly POSIX compliant and does not impmement extensions. For backups, I recommend the option-dump
that switches to theexustar
format plus additional meta data. A blocksize of 128 is not supported by all hardware, 126 is recommended for best portability.-fifo
is the default since 30 years. Make sure to use at least release 1.6.1, since before there have been some hangs in the fifo on Linux.