BSD or not BSD tar? reddit / freebsd ---------------------------------------------------------------------- ovig · 2021-05-15 18:03 Question relates to FreeNAS/TrueNAS but as they are based on FreeBSD I thought appropriate to post here too. I set out to use tar with a newly acquire LTO-5 drive for which I'd like a graceful way to handle multiple tapes, and came across something I can't explain. A bit of Googling points to the fact that not all tar versions support the **-M /** **--multi-volume** option, but that GNU's (gnutar) definitely does. This is confirmed by the GNU website: [http://www.gnu.org/software/tar/manual/html\_section/Using-Multiple- Tapes.html](http://www.gnu.org/software/tar/manual/html_section/Using- Multiple-Tapes.html) It looks like FreeBSD uses gnu-tar; in any case, the man page I found on the freebsd.org clearly indicates that it supports "gnu style flags" and lists explicitly **-M /** **--multi-volume** as an option But on my TrueNAS 12 - which as far as I know is based on FreeBSD 12.2-RELEASE-p6 - whilst the gnu binary seems to be the bsd/freebsd one, it does not support **-M /** **--multi-volume:** root@truenas\[\~\]# file /usr/bin/tar /usr/bin/tar: symbolic link to bsdtar root@truenas\[\~\]# file /usr/bin/bsdtar /usr/bin/bsdtar: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 12.2, FreeBSD-style, stripped root@truenas\[\~\]# tar -f /dev/nsa0 --multi-volume \[filelist\] tar: Option --mutli-volume is not supported \[...\] The same happens with **-M** instead of **--multi-volume** (or almost - it aborts and displays the usage information without the "tar: Option -M is not supported" that I'd expect but it still doesn't seem to work). So my question(s) for the community are: \- does the /usr/bin/tar and /usr/bin/bsdtar on a stock FreeBSD 12.2 actually support **-M /** **--multi-volume?** \- does anyone knows how/why the support for **-M /** **--multi- volume** got dropped between GNU tar - FreeBSD's and TrueNAS's? \- what would be my best route to getting a multi-volume supporting tar on TrueNAS: I suspect compilation from source - but which source would compile out-of-the-box on TrueNAS; or at least with the minimal amount of wizardry? Many thanks in advance ---------------------------------------------------------------------- dddddavidddd · 2021-05-15 18:12 On FreeBSD 13, `man tar`: > There is not yet any support for multi-volume archives. If you need this feature, install GNU tar with `pkg install gtar`. ---------------------------------------------------------------------- FUZxxl · 2021-05-15 20:25 Note that while GNU supports multi volume archive, they are inherently broken and may lead to unreadable archives if the tape ends at an unfortunate point. I recommend using `star` by Jörg Schilling for this purpose. It even has a special double-buffering mode for faster operation on tapes. ---------------------------------------------------------------------- antiduh · 2021-05-15 21:15 Unrelated, have you considered using Bacula as a more comprehensive backup solution? ---------------------------------------------------------------------- fracai · 2021-05-16 03:00 This probably won’t work on FreeNAS and definitely isn’t supported. The main OS is meant to be an modified appliance. You could do this in a jail, but I’m not sure how easily you can get access to the tape drive from inside a jail. ---------------------------------------------------------------------- timeshiftninja · 2021-05-16 05:06 Perhaps bareos https://www.bsdnow.tv/254 ---------------------------------------------------------------------- rykolepl · 2021-05-16 09:58 I'm using bacula, kind of hard to setup, but once it's working, it's working. And has GREAT support for tape drives ---------------------------------------------------------------------- antiduh · 2021-05-16 16:04 Ah cool. If you need any help setting it up, let me know.