sonntagnacht/backup-bundle
Composer 安装命令:
composer require sonntagnacht/backup-bundle
包简介
command to take a snapshot of your project for symfony 2.8+
README 文档
README
This BackupBundle can create backups from type daily, weekly, monthly or yearly. It'll save your default database and GaufretteFilesystems to tar.gz-archive in a GaufretteFilesystem.
Installtion
Run composer require sonntagnacht/backup-bundle to use SNBackupBundle in your Project.
Configuration
Add to AppKernel.php
class AppKernel extends Kernel { public function registerBundles() { $bundles = array( new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), new Symfony\Bundle\SecurityBundle\SecurityBundle(), new Symfony\Bundle\TwigBundle\TwigBundle(), // ... new SN\BackupBundle\SNBackupBundle(), // ... return $bundles; } // ... }
config.yml
knp_gaufrette: ... filesystems: backup_fs: adapter: ... sn_backup: target_fs: backup_fs databases: - mydb # name of your doctrine database connection include_fs: - image_fs # names of gaufrette filesystems wich should backuped
Usage
To take a backup of your current webapplication (database and gaufrette filesystems)
php bin/console sn:backup:dump [daily|weekly|monthly|yearly]
For large Backups, we skipped an initial connection check because the connection might get lost until everything is stored in a tar
If you still want a check if the filesystem exists, execute the backup command with --check-target-fs
Get a list of all backups
php bin/console sn:backup:restore
Restore a saved backup
php bin/console sn:backup:restore [id]
Delete backups whiche are older than seven days.
php bin/console sn:backup:cleanup [daily|weekly|monthly|yearly] 7d
WebGUI
To use the webgui add following lines to routing.yml
SNBackupBundle: resource: "@SNBackupBundle/Controller/" type: annotation prefix: /backup
统计信息
- 总下载量: 171
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-02-08
