定制 juanchosl/backups 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-12-23