fgh151/yii2-backup Database Backup and Restore functionality

databasebackuprestore

Русская документация доступна на сайте OpenItStudio

Yii2 Backup and Restore Database

Database Backup and Restore functionality

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist fgh151/yii2-backup "*"

or add

"fgh151/yii2-backup": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply add it in your config by :

Basic config/web.php

Advanced [backend|frontend|common]/config/main.php

    'modules'    => [
        'backup' => [
            'class' => 'fgh151\modules\backup\Module',
        ],
        ...
        ...
    ],

Console

        'bootstrap' => ['backup'],
        'modules' => [
                'backup' => [
                    'class' => 'fgh151\modules\backup\Module',
                    'path' => '@backend/_backup/' //path alias of backup dir
                ]
            ],

make sure you create a writable directory named _backup on app root directory.

RBAC

You can use RBAC with module. Simply add it in your config:

        'modules'    => [
             'backup' => [
                 'class' => 'fgh151\modules\backup\Module',
                 'as access' => [
                     'class' => 'yii\filters\AccessControl',
                     'rules' => [
                         [
                             'allow' => true,
                             'roles' => ['admin'],
                         ]
                     ]
                 ]
             ]
            ...
            ...
        ],

Usage

Pretty Url's /backup

No pretty Url's index.php?r=backup

Console yii backup/backup

Statistics

Downloads
GitHub Stars
GitHub Forks

Releases

Comments



1.0.2 is the latest of 2 releases



Apache-2.0 license
Stats
4 github stars & 0 github forks
0 downloads in the last day
0 downloads in the last 30 days
1090 total downloads