Decompress a file with s2 extension?

Hi ,
how can i decompress a file with s2 extension created by pbm backup?
Is there a benchmark of compression speed with the variuos provided extension?
Regards

Hi,
You can uncompress the backups using s2 utility.

Note: This tool is not officially supported by Percona.

##Install the S2 utility to uncompress it with below:
$ sudo yum install go
$ go install github.com/klauspost/compress/s2/cmd/s2c@latest && go install github.com/klauspost/compress/s2/cmd/s2d@latest

Once installed uncompress the backups by using below:

BACKUP_DATA_PATH=/backup/mongo_backups/
#Uncompress using below:
for i in $(find $BACKUP_DATA_PATH -type f -name "*.s2");
do
 go/bin/s2d --rm $i >> out.txt;

done

Regarding benchmarking of compression speed test, please follow our pbm-page troubleshooting here.

Thanks

2 Likes

Thank you for tuor answer .
I’ll giv it a try (in the meanwhile i switched to gzip compression, that is fast enough at the moment and compresses more)
Regards