No matter how much one can try to prevent problems, accidents can happen when you least expect them. Depending on how serious the accidents can be, it is always wise to take some precautions to minimize the losses when such accidents happen.
When you have a Web site running, there are several types of accidents and incidents that may happen and cause important losses, like for instance loosing the information contained in the files that make you site scripts, configuration files, database files, etc..
This class provides a solution for making backup of any types of files that you may find important. It builds compressed backup files to take less space in the disk and less time to copy to a safe place.
This class is meant to make a compressed archive in the .tar.gz format that includes backup copies of the files of a site.
It uses function exec() to call the tar program that creates the backup archive, but the class can changed use passthru() function to get all output of the command.