Code: Select all
tar -cf - /zfs-raidz1/zoneminder/ | pv | zstd -T0 | split -b 100G -d - zoneminder_archive.tar.zst_- tar -cf - /zfs-raidz1/zoneminder/
Creates a tar archive of the directory
- -f - sends output to stdout instead of a file
- pv
Shows progress (throughput, ETA, size processed)
- zstd -T0
Compresses using Zstandard
-T0 = use all CPU cores
- split -b 100G -d - zoneminder_archive.tar.zst_
Splits the compressed stream into 100 GB chunks
-d uses numeric suffixes (00, 01, 02…)
Code: Select all
cat zoneminder_archive.tar.zst_* | zstd -d | tar -xf -- cat zoneminder_archive.tar.zst_*
Concatenates all split parts (.zst_aa, .zst_ab, etc.) into a single stream.
This assumes the archive was split into multiple chunks.
- zstd -d
Decompresses the combined stream using Zstandard (zstd).
Output becomes the original .tar archive.
- tar -xf -
Extracts (-x) files from a tar archive.