execut/yii2-backup

Database and files backup command for yii2

Installs: 165

Dependents: 0

Suggesters: 0

Security: 0

Stars: 6

Watchers: 4

Forks: 7

Open Issues: 0

Type:yii2-extension

1.1.0 2016-06-17 11:19 UTC

This package is auto-updated.

Last update: 2024-03-29 03:44:24 UTC


README

Command for reserving yii2 project databases and gitignored files. After starting command databases dumps and project folders specified in the settings is compressed, it split in pieces and fill them to the specified ftp.

Installation

The preferred way to install this extension is through composer.

Install

Either run

$ php composer.phar require execut/yii2-backup "dev-master"

Configuration

For usage add in console this config and modify it:

<?php
...
    'controllerMap' => [
        'backup' => [
            'class' => 'execut\backup\controllers\BackupController',
            'ftpDir' => 'backups',
            'ftpHost' => 'localhost',
            'ftpLogin' => 'login',
            'ftpPassword' => 'password',
            'folderPrefix' => 'backups-production',
            'dbKeys' => [
                'db',
                'dbOther',
            ],
            'adminMail' => 'root@localhost.com',
            'filePartSize' => '300MiB', // Split unix command part size
        ],
...

After configuration, simple add task to cron:

0 6 * * *	root	cd /projectFoder && ./yii backup