Question: What is the best way to compress a file if it is more than 4 GB in size?

I am using the following for last several months.

```
mysqldump --all-databases | zip > mybackup.zip

```

Today I am got an error:

```
zip error: Entry too big to split, read, or write (file exceeds Zip's 4GB uncompressed size limit)

```

I am considering using bzip2. Is my choice correct?

Answer: 
Why not use the industry standard for this kind of stuff: "gzip"?

```
mysqldump --all-databases | gzip > mybackup.gz

```

Size Comparison:

```
720K    mybackup.gz     (compressed)
2.6M    mybackup.sql    (same data, but uncompressed for comparison)

```
Either upgrade `zip` to at least version 3.0 to support Zip64:

```
$ zip -v

This is Zip 3.0 (July 5th 2008), by Info-ZIP.

Zip special compilation options:
    LARGE_FILE_SUPPORT   (can read and write large files on file system)
    ZIP64_SUPPORT        (use Zip64 to store large files in archives)

```

or use the different tools such as: 7z, pbzip2, ...

> 
> You should be able to compress files larger than 4GB with pbzip2.
> 
> 
>