PHP Classes
elePHPant
Icontem

tarX: Dump and restore directories into archive files

Recommend this page to a friend!
  Info   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2010-12-29 (5 years ago) RSS 2.0 feedNot yet rated by the usersTotal: 253 All time: 7,372 This week: 1,109Up
Version License PHP version Categories
tarx 1.0BSD License3.0Files and Folders, Compression
Description Author

This class can be used to dump and restore directories into archive files.

It can traverse a given directory recursively and build an archive with the contents of the directory files.

The class can also do the opposite, i.e, recreate the original directory structure and file contents retrieving it from a previously generated contents file. The original file owners and permissions are restored too.

The main advantage is that it's written in pure PHP and does not require any special modules/software to be installed.

Picture of Neleus
Name: Neleus <contact>
Classes: 1 package by
Country: Bermuda

Details
This is a simple script that stores (dumps) all files from input directory (including all files from subdirectories)
into two files (that together make a dump) and allows to restore it later to desired location. It may be useful in environments
with restricted pemissions (e.g. executing an OS processes).
Features:
 - preserves directory structure (relative to input directory)
 - preserves file (and directory) modification and last access time
 - preserves file (and directory) permissions
 - does not require any special modules
 - uses low memory (so may be run on environments with low memory limit)
 - may take long to complete if an input directory is too large (so may not work on environments with low execution time limit)
 - is very simple so should work in most environments
 - the produced dump files could not be used by another programs than this script because they have a custom format that is not supported by others
 - does not compress the files
 - either of the output files cannot be used separately, they are two parts of the same dump. You should not exchange them, edit, rename, etc.

See examples and description in source files.

Disclaimer: This software is released “as is.” The author makes no warranties, either express or implied, regarding the use of this software for any particular purpose. You are using this software at your own risk. The author is not responsible for any damages caused by the use or misuse of this software and cannot provide any warranty with this software. The author is not liable for any incidental, indirect, or consequential damages related to the use or the inability to use this software (such as damages for loss of business, profits, loss of data, etc.) or its accompanying documentation. This software has not been thoroughly tested on all operating systems and configurations, nor other computers, and therefore comes with no guarantee as to its stability or performance on your particular system. Use it entirely at your own risk.
  Files folder image Files  
File Role Description
Plain text file dump_dir.php Class class
Accessible without login Plain text file example_tar.php Example store example
Accessible without login Plain text file example_untar.php Example restore example
Accessible without login Plain text file readme.txt Doc. description

 Version Control Unique User Downloads Download Rankings  
 0%
Total:253
This week:0
All time:7,372
This week:1,109Up