juanchosl/backups
Composer 安装命令:
composer require juanchosl/backups
包简介
Little methods collection in order to create distincts type of backups
README 文档
README
Description
Little methods collection in order to create distincts type of backups
Install
composer require juanchosl/backups
Packagers
First, you need to select the desired final file type in order to backup your files and folders, can use:
- ZipRepository
- TarRepository
- PharRepository
Compression
Aditionally, we have available some compression systems in order to use with other needs
- Bzip
- Gzip
- Lzf
- Deflate
Strategies
The Backup library, can rename the result file in order to mantain some copies, we can use
- Datetime in format YYYYmmddHHiiss
- Incremental number from 1 to N
- Rotate number, from 1 to N and restart from 1
How to use
use JuanchoSL\Backups\Strategies\BackupNumIncremental; use JuanchoSL\Backups\Engines\Packagers\ZipEngine; $parent = dirname(__DIR__, 1); $obj = new BackupNumIncremental() $obj->setNumBackups(2) ->setEngine(new ZipEngine()) ->setDestinationFolder($parent . DIRECTORY_SEPARATOR . 'backups') ->addExcludedDir($parent . DIRECTORY_SEPARATOR . 'backups') ->addExcludedDir($parent . DIRECTORY_SEPARATOR . 'vendor'); $obj->pack($parent);
统计信息
- 总下载量: 20
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-12-23