承接 sylvainjule/backups 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

sylvainjule/backups

Composer 安装命令:

composer require sylvainjule/backups

包简介

Manage backups from the Kirby panel

README 文档

README

This plugin allows you to create, download and manage backups from a dedicated View. Works together with kirby-janitor.

screenshot-k5


Overview

This plugin is completely free and published under the MIT license. However, if you are using it in a commercial project and want to help me keep up with maintenance, you can consider making a donation of your choice.


1. Installation

Kirby 3: up to 1.0.3. Kirby 4: up to 1.0.5. Kirby 5: 1.1.0+.
You also must install kirby-janitor (and the CLI per janitor's instructions) for this plugin to work.
For older releases, install the kirby-janitor release from the same timeframe.

Download and copy this repository to /site/plugins/backups

Alternatively, you can install it with composer: composer require sylvainjule/backups


2. Usage

The plugin will work out of the box, no need for additionnal setup.

You can, however, change the prefix of the backups' filename (default is backup-{TIMESTAMP}.zip)

// site/config.php
return [
    'sylvainjule.backups.prefix' => 'backup-',
];

Any backup, created either with this plugin or with any of the janitor's options (CLI, CRON job, etc), will now show up in the Backups view.

Janitor stores the backups in a site/backups folder. This folder isn't public and we should keep it that way. Therefore, anytime a user triggers a Download button, the plugin will create a copy of the given backup in a backups-temp folder and expose an url from there.

When the user leaves the view, copies will be deleted.

This default public assets/backup-temp folder can be changed to any name you'd like:

// site/config.php
return [
    // backups will be copied in assets/my-secretly-public-backups
    'sylvainjule.backups.publicFolder' => 'my-secretly-public-backups',
];

If you want more control over where backups are created / copied, you can set both paths with their dedicated option (if you change the public path, make sure to fill both the publicPath and publicUrl options):

// site/config.php
return [
    // if filled, backups will be created here
    'sylvainjule.backups.path' => '{{ kirby.root("site") }}/my-custom-folder',
    // if filled, backups will be copied here for downloading (in this case, it will take precedence over the publicFolder option)
    'sylvainjule.backups.publicPath' => '{{ kirby.root("assets") }}/my-custom-folder',
    'sylvainjule.backups.publicUrl'  => '{{ kirby.url("assets") }}/my-custom-folder',
];

You can enforce a maximum number of backups by setting the maximum option to any integer (default is false). If this number is reached the oldest backup will be deleted automatically whenever a new backup is created. If included in a client website, you should include a note specifying an expected frequency of backup creation / deletion (or set up a CRON job).

// site/config.php
return [
    'sylvainjule.backups.maximum' => 5,
];

If you want to create backups from a CRON job and still benefit from this maximum option, the plugin exposes a tweaked janitor webhook:

https://your.domain/backups-webhook/{janitor.secret}/create-backup

If you have set the maximum option to a high amount, you can choose the pagination limit of the table with the limit option (default is 20).

// site/config.php
return [
    'sylvainjule.backups.limit' => 20,
];

There's also a way to disable the "Backups" menu-item for specific user roles:

# site/blueprints/users/{role}.yml
permissions:
  access:
    backups: false

3. License

MIT


4. Credits

  • The plugin relies on the Janitor plugin by @bnomei, who tweaked it a bit in order to make the development of Backups easier. 🙏

sylvainjule/backups 适用场景与选型建议

sylvainjule/backups 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 4.47k 次下载、GitHub Stars 达 42, 最近一次更新时间为 2020 年 04 月 13 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 sylvainjule/backups 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 sylvainjule/backups 我们能提供哪些服务?
定制开发 / 二次开发

基于 sylvainjule/backups 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 4.47k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 42
  • 点击次数: 7
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 42
  • Watchers: 2
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-04-13