+1 (717) 461-8095 /+263 (775) 937-458 /+263 (777) 337 348 enquiries@bibliotechzw.com

Backups tend to take up a lot of space, especially if you have a large database, such as a Koha SQL database with thousands of items and records. To save space, you can easily compress the file (or any folder) using one line on the Ubuntu Commandline.

If you don’t know how to backup, please read this article first. If you’ve already done your backup, do the following to compress your backup file or folder to the smallest possible size using 7zip. We recommend you compress using Tar first since 7z does not preserve

$ 7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on #archive.7z #file-to-be-compressed

where:

#archive.7z is the name of the new archive you are creating. Don’t forget to put the 7z extension

#file-to-be-compressed is the name of the file or folder you want to compress. If it is in a different folder to the one you are in, include the path.

The ultra settings are explained as follows:

-t7z

7z archive

-m0=lzma

lzma method

-mx=9

level of compression = 9 (Ultra)

-mfb=64

number of fast bytes for LZMA = 64

-md=32m

dictionary size = 32 megabytes

-ms=on

solid archive = on

So if you want to compress a SQL file called koha-backup.sql and name it koha-backup.sql.7z you would do the following:

$ 7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on koha-backup.sql.7z  koha-backup.sql
 

Subscribe To Our Newsletter

Join our mailing list to receive the latest special offers and news updates from our team.

You have Successfully Subscribed!

Share This