定制 sonntagnacht/backup-bundle 二次开发

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

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

sonntagnacht/backup-bundle

Composer 安装命令:

composer require sonntagnacht/backup-bundle

包简介

command to take a snapshot of your project for symfony 2.8+

README 文档

README

Latest Stable Version Total Downloads License

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

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

GitHub 信息

  • Stars: 3
  • Watchers: 2
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-02-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固