Up

Kubik-Rubik Zip Script

FREE Hot EOL 1.1 
Kubik-Rubik Zip Script
zip_v1.1.zip
Version:
1.1
License:
GPLv3
Author:
Viktor Vogel
Date:
05 July 2012
Downloads:
501

Kubik-Rubik Zip Script

With this small 8 kb script you can zip all files and (sub-)folders within seconds into an archive. You can use this script to backup all your files once or as often as you need (e.g. with the help of cronjobs). The default settings are optimized for a single zip creation. If you want to use this script for regular backups, then you should change some options in the settings of the script (directly in the script file).

This version was tested with PHP 5.3 and has German output notices!

Changelog

+ = Added - ! = Removed - ^ = Changed - # = Fixed

Version 1.0

+ First release of the script

Version 1.1

+ New Feature - Max. number of stored zip archive files at the same time
+ New Feature - Security token to protect the script from being called directly
+ Optimized Zip Function - faster execution and correct path building if the script is called from a subfolder
+ Added ZipArchive class check

Notes

How to change the settings for regular backups?

Open the script file with an editor (e.g. Notepad++) and adjust the settings:

  • $folder = '.' // Should not be changed.
  • $add_empty_folders = true; // Should not be changed, except you don't need empty folders in the backup.
  • $name_of_archive = false; // Should not be changed, except you need an indivdial name.
  • $target_directory = '.'; // Should be changed to a folder which is not used, e.g. 'backup'. You should protect this folder with a .htaccess file!
  • $overwrite_archive = true; // Should be changed to false to avoid loss of old backups. If you have limited webspace then leave true.
  • $exclude_files = false; // Should not be changed, except you want to exclude files you don't need in the backup.
  • $exclude_folders = false; // Should not be changed, except you want to exclude folders you don't need in the backup.
  • $delete_zip_script = true; // Should be changed to false, otherwise you have to upload the script for each backup process again.
  • $token = false; // Should be changed to a long and secure token to protect the script.

You should rename the script (zip.php) to avoid calls from unauthorized!

Use at your own risk!

Don't waste your time when creating your daily backups!