tar cf - /path/to/data | 7z a -si archivename.tar.7z
The post also has some additions useful.
"What others think
some newer versions of tar support the '--lzma' option
LZMA is the same type of compression used by 7zip
This is a cleaner option, though I suppose it is only supported by newer versions of tar which could be a problem...
tar c --lzma /path/to/data > archivename.tar.lzma
Comment by infinull 174 weeks and 4 days ago
According to google, GNU tar supports the lzma option since tar 1.20. Starting in tar 1.22 -J (capital 'j') means --xz and not --lzma.
Comment by bwoodacre 174 weeks and 3 days ago