Sample Header Ad - 728x90

Make tar on multiple predefined tapes

2 votes
1 answer
244 views
How do I tar some files to multiple tapes, with each tape being listed in advance? This way I can have a fully-unattended archival, with no need to physically change media once a tape is full. In my specific case, - Each tape is actually a /dev/sd? block device, with the archive being written to the raw disk and not having partitions or filesystems to save on space. - All target disks are connected to the host machine simultaneously. - tar is GNU version 1.34. - Largest single file size is smaller than the size of the smallest target. So far, to perform this task, I've got this command: tar -c -M -f /dev/tape1 -f /dev/tape2 ... /files/to/be/archived. Step-by-step walkthrough: 1. tar -c is the command to create a tar archive. 2. -M tells tar that I want to make a multi-volume archive. 3. -f is listed multiple times with each target tape to be written to. 4. /files/to/be/archived is what is to be archived. Due to --tape-length not being present in the command, tar should write as much as it can on each tape, regardless of how big the tape is in relation to others. This allows for tapes of unequal sizes. Will this work as I have explained above, or will the behavior of tar be different?
Asked by Alexander M (131 rep)
Mar 28, 2022, 10:24 PM
Last activity: Apr 13, 2022, 02:33 PM