BZ2
You can also paste a file or a link to a file with Ctrl+V
Don't see your format?
When you need BZ2 to TAR
TAR is the standard Linux and Unix archive without compression. It gathers files into one container, and many scripts, deployment systems, and backup tools expect exactly that. A .bz2 file, on the other hand, is compression of a single file. If your system needs a plain tar and all you have is a bz2, repacking removes that barrier in one step.
Typical cases: a distribution or a dataset arrived as .tar.bz2 while the next processing stage accepts only an uncompressed tar; an export sits in .bz2 while the loader expects a tar archive.
What you get
- If you upload a regular
.bz2, the new TAR holds one file under its original name:dump.sql.bz2becomes a tar withdump.sql. - If you upload a
.tar.bz2, its contents (all the files) are laid out in the new uncompressed TAR.
The data inside does not change; only the packaging does. The main difference from ZIP: TAR does not compress, so the result may be noticeably larger than the source BZ2, which compresses hard but works slower than other formats.
When TAR beats ZIP
- The file goes on to a Linux system, a script, or a pipeline that takes tar.
- You need an uncompressed archive to apply your own compression later.
- You want fast access to the content without the slow BZ2 algorithm.
- For a person on Windows or Mac, BZ2 to ZIP is more convenient - it opens with no software.
Common tasks and search situations
- tar.bz2 to plain tar without compression;
- the uploader accepts only tar;
- strip bz2 from an export file;
- prepare a dataset for a script;
- a distribution in tar.bz2 but tar is needed;
- repack bz2 for Linux without the command line;
- bz2 to tar on a computer without tar and bzip2.
What to check before converting
- Make sure you need an uncompressed tar: for someone without Linux, ZIP is better.
- Mind the size: an uncompressed TAR can grow several times compared with BZ2.
- Check that the file downloaded completely, otherwise it will not unpack.
- If you need a gentler compression rather than tar, see GZ to TAR or XZ to TAR for the neighboring formats.
Limitations
BZ2 does not support passwords, so protected files do not occur here. A damaged or incomplete file may fail to unpack, and the service does not repair such data. TAR does not compress anything by itself: if small size matters, it is not the best choice.
Related tasks
For a person on Windows or Mac - BZ2 to ZIP. For an .xz file - XZ to TAR; for .gz - GZ to TAR.
What is BZ2 to TAR conversion used for
Distribution for a deployment system
A package arrived as tar.bz2, and the next stage takes only an uncompressed tar.
Dataset for a script
The processing script expects tar, while the export was saved as .bz2.
Dump for a Linux server
A database dump is stored in .bz2, and the loader on the server reads only tar.
Archiving with your own compression
You need a neutral tar to which a different compression will be applied later.
Tips for converting BZ2 to TAR
Choose ZIP for people
If a person on Windows or Mac will look at the file, ZIP is more convenient: it opens without software.
Estimate the size in advance
An uncompressed tar can take several times more space than the source BZ2. Make sure there is room for the result.
Check integrity
If the download was interrupted, fetch the bz2 again: a truncated file does not convert.