bwein-net/contao-database-backup
Composer 安装命令:
composer require bwein-net/contao-database-backup
包简介
Database Backup for Contao Open Source CMS
README 文档
README
This Bundle provides a backend module to easily create and list backups of the contao database. The backups can be downloaded in the backend and backups can be created manually by backend users.
Please read the migration notes from version 1 below!
The console command bwein:database:backup and cronjob listener were removed from the extension in version 2 because
Contao 4.13 includes a backup command - see: https://docs.contao.org/manual/en/cli/db-backups/
Installation
Install the bundle via Composer:
composer require bwein-net/contao-database-backup
Configuration
In the config/config.yml you can add the following optional parameters:
# config/config.yml bwein_database_backup: cron_interval: 'daily'
The default of cron_interval is null - so no cron job is running.
You have to define it manually - see: https://docs.contao.org/manual/en/cli/db-backups/#have-backups-created-automatically
The option cron_interval can be minutely, hourly, daily, weekly, monthly, yearly or a full CRON expression, like */5 * * * * - see: https://docs.contao.org/dev/framework/cron/#using-service-tagging
Attention: Even if you define daily as cron_interval you need to specify the keep_max and keep_intervals of the core to have daily backups e.g.
# config/config.yml contao: backup: keep_max: 10 keep_intervals: ['1D', '2D', '3D', '4D', '5D', '6D', '7D', '14D', '1M']
Migration from version 1 to 2
Replace Configuration
The custom configuration bwein_database_backup has to be removed from config/config.yml.
Optionally, it can be replaced by the core configuration - see: https://docs.contao.org/manual/en/cli/db-backups/#configuration
Run Migration
The existing backups will be automatically moved from var/db_backups to var/backups with a migration by
running contao:migrate or use the Contao Install Tool.
Change backup directory
If you use deploy tools like deployer that define shared dirs, you need to change the backup directory from var/db_backups to var/backups!
Add Cronjob
The cronjob listener has been removed so you have to add a manual daily routine:
0 4 * * * /path/to/system/vendor/bin/contao-console contao:backup:create
see: https://docs.contao.org/manual/en/cli/db-backups/#have-backups-created-automatically
Replace command usages
The command bwein:database:backup has been removed so you need to replace the usages to contao:backup:create -
see: https://docs.contao.org/manual/en/cli/db-backups/#contao-backup-create
bwein-net/contao-database-backup 适用场景与选型建议
bwein-net/contao-database-backup 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 22.4k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2018 年 08 月 14 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「database」 「sql」 「dump」 「backend」 「backup」 「contao」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 bwein-net/contao-database-backup 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 bwein-net/contao-database-backup 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 bwein-net/contao-database-backup 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
This package will add the `dd` and `dump` helpers to your Phalcon application.
Dibi is Database Abstraction Library for PHP
Simple Twig extension improving templates debugging
nice output for debug functions for PHP 5.3
Store your language lines in the database, yaml or other sources
A package for automatically encrypting and decrypting Eloquent attributes in Laravel 5.5+, based on configuration settings.
统计信息
- 总下载量: 22.4k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 32
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-08-14