Skip to content

Command for backup yii2 project databases and gitignored files

License

Notifications You must be signed in to change notification settings

execut/yii2-backup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

yii2-backup

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' => '[email protected]',
            'filePartSize' => '300MiB', // Split unix command part size
        ],
...

After configuration, simple add task to cron:

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

About

Command for backup yii2 project databases and gitignored files

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages