We moved this page to our Documentation Portal. You can find the latest updates here. |
Question
What is backup compression and how can I compress backups?
Environment
CentOS 6/7
Answer
Backup compression allows you to reduce the storage space used by your backup files and thus increase backup speed. The most common tool to compress backups on the backup server is GZip, but it does not develop the data compression full potential. To increase your backup speed even more, it is recommended to compress backups using pigz instead of GZip. pigz or Parallel Implementation of GZip is a functional replacement that uses multiple cores that significantly reduces the time needed for the backup creation.
Enable pigz instead of GZip
To enable pigz and force its usage across the whole server, do the following:
- Download and install EPEL repository files:
-
RHEL/CentOS 6
# yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
RHEL/CentOS 7
# yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
-
- Install pigz from EPEL repository
# yum install pigz
- Move gzip to back
# mv /bin/gzip /bin/gzip.bin
- Create a link pointing to pigz
# ln -s /usr/bin/pigz /bin/gzip
After the backup compression is enabled, pigz will be overlayed by GZip RPM package reinstall or update.
Enable pigz on CloudBoot
In order to use pigz and unpigz on CloudBoot compute resources, do the following:
- Download these two files to your Control Panel:
-
CentOS 6
http://rpm.repo.onapp.com/utils/pigz-2.2.5-2.1.x86_64.tar.gz
CentOS 7
http://rpm.repo.onapp.com/utils/pigz-2.3.3-1.el7.centos.x86_64.tar.gz
-
- Distribute the files to your CloudBoot compute resources with SCP to /tmp/ folder:
scp /root/pigz-2.2.5-2.1.x86_64.tar.gz root@192.168.1.31:/tmp/
- Login to the compute resource with ssh:
cd /tmp/;tar xzvpf pigz-2.2.5-2.1.x86_64.tar.gz -C /
- Move gzip to back:
mv /usr/bin/gzip /usr/bin/gzip.bin
- Create a link pointing to pigz:
ln -s /bin/pigz /usr/bin/gzip
- Move unzip to back:
mv /usr/bin/unzip /usr/bin/unzip.bin
- Create a link pointing to unpigz:
ln -s /bin/unpigz /usr/bin/unzip