dar_split - Man Page

dar helper to split an archive over several tapes


dar_split [-b <bytes>] [-r <rate>] { [-c <count>] split_input | [-s] split_output } <filename>

dar_split -V

dar_split -h


dar_split is to be used with dar to read or write a large archive from or to several tapes.


dar_split has two modes of operation: split_input and split_output


in this mode, dar_split copies <filename> to its standard output. <filename> may be a special device like /dev/tape or any other inode that has the ability to access removable volumes. When dar_split reaches the end of <filename> it suspends and waits for the user to press the return key in order to continue. In the meanwhile the user can rewind and change the tape. When dar_split is awaken again, it reopens <filename> and sends its content to its standard output as if it was the continuation of what was read so far before reaching the end of file.


in this mode dar_split copies its standard input to <filename>. However if <filename> is full, dar_split suspends and waits for the user to press the return key in order to continue. In the meanwhile, the user can rewind and change the tape. When dar_split is awaken again, it reopens <filename> and continues to copy to <filename> what was not yet written previously. Pay attention to the fact that if you don't change the destination media, the continuation of data copy may erase what was written so far depending on the type of media.



this option is only available in split_output mode an leads dar_split to perform sync writes in place of normal writes. This has the drawback to drastically reduce performances but may be necessary under certain circumstances where the operating system cache reports a write operation as successful while the cache underlying medium is already full.

-b <bytes>

this option makes read and write system call not exceeding the given amount of bytes instead of by default using the maximum amount the system permits. This may reduce performances as it will require dar_split to make more system call to achieve the same operation, but can cope this way with some devices that accept only limited buffer size per system call.

-r <rate>

this option limits the transfer rate to the given value in bytes per second.

-c <count>

this option limit the number of tape dar_split will read data from. If you know by advance this number, this avoid you having to stop by hand dar_split once the archive has been fully read. It will stop once the end of file of the <count> last file will be reached. This option is of course only available in split_input mode.

Examples of Use

creating an archive over several tapes

dar -c - ...possibily other dar options... | dar_split split_output /dev/tape

Here dar generates the archive to its standard output which is read by dar_split and copied to /dev/tape. When the tape reaches its send, dar_split asks for the user to hit return to continue.

reading an archive splitted over several tapes

dar_split split_input /dev/tape | dar -t - --sequential-read ...possibily other dar options...

Here dar_split reads /dev/tape and sends its content to dar which *must* be used in --senquential-read mode in order to read an archive from its standard input without the help of dar_slave. When the tape reaches its end, dar_split asks for the user to hit return to continue.

Note that dar_split can also be used with tar for the same purpose as with dar:

tar -cz ... | dar_split split_output /dev/tape

without -f option nor TAPE environment variable, tar sends the tar archive to stdout, which get fet to dar_split for slicing

dar_split split_input /dev/tape | tar -tz

without -f option nor TAPE environement variable, tar read the tar archive from stdin, however you must specify the correct option corresponding to the compression used at archive creation time.

The advantage here is to be able to save a huge dar or tar archive on several tapes that could be either partially filled or having different sizes, without having to calculate in advance the size of slices to specify. The drawback is that this implies sequential reading for dar (for tar also, but tar cannot do else).

With or without filesystem

You can use dar_split with floppies, zip/jazz disks or usb key too, but it has many disadvantages compared to the normal way of using this media: doing that way avoids you relying on a filesystem, thus you cannot have direct access to file contents, which dar knows how to take advantage of, and you are instead stuck with sequential read access which is long as it requires reading the whole archive (same way as tar does).

When instead using dar alone in normal mode (non sequential reading mode using filenames instead of standard input/output), you have the opportunity to create redundancy data beside dar slices thanks to par2, which is not possible without a filesystem. At restoration time, thanks to dar archive's catalog, dar can directly seek to the file's data you want to restore, which is very quick compared to reading/unciphering/uncompressing the whole archive...

Note that copying tape contents generated by dar_split to different files which name would correspond to dar slices, does not make a valid multi-sliced archive because the slice header is missing in slices (except in the first). You can however concatenate all the pieces of data generated by dar_split and have a valid single sliced dar archive that you can use in direct access mode. However attention must be paied not to add any extra data after data generated by dar through dar_split (in particular if the last tape was not full), in that case you can only read the archive with --sequential-read mode.

Exit Codes

dar_split exists with the following codes:


upon normal execution


syntax error on command-line


could not open source or destination files


Any signal sent to dar_split except SIG_PIPE will abort the program immediately

See Also

dar(1), dar_xform(1), dar_manager(1), dar_slave(1), dar_cp(1)

Known Bugs



Denis Corbin

Referenced By

dar(1), dar_cp(1), dar_manager(1), dar_slave(1), dar_xform(1).

June 19th, 2022