phuongdev89/yii2-backup

Yii2 backup module

Installs: 26

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Type:yii2-extension

dev-master 2024-01-08 18:02 UTC

This package is auto-updated.

Last update: 2024-11-08 20:13:42 UTC


README

Yii2 backup module

Installation

The preferred way to install this extension is through composer.

Either run

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

or add

"phuongdev89/yii2-backup": "*"

to the require section of your composer.json file.

Migration

php yii migrate --migrationPath=@vendor/phuongdev89/yii2-backup/src/migrations

Usage

First, go to web:

http://localhost/index.php?r=backup/config

In console configure:

'controllerMap'       => [
    'backup' => [
        'class' => 'phuongdev89\backup\commands\BackupController',
    ],
],
'modules'             => [
    'backup' => [
        'class'     => 'phuongdev89\backup\Module',
        'databases'     => [
            'db',
            'db1',
        ],
        'directories' => [
            '@app/web/uploads',
            '@backend/web/uploads',
        ],
        'transport' => [
            'mail' => [
                'class'     => '\phuongdev89\backup\transports\Mail',
            ],
            'ftp'  => [
                'class'  => '\phuongdev89\backup\transports\Ftp',
            ],
        ],
    ],
]

How to use in command line:

php yii help backup

####Notice: