Download the PHP package amoracr/yii2-backup without Composer
On this page you can find all versions of the php package amoracr/yii2-backup. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package yii2-backup
Yii2-backup
Backup and Restore functionality for Yii2 applications.
This extension is based on:
- yii2-backup by Ivan Orlov,
- yii2-backup by Ellera.
- php-sqlite-dump by ephestione
- extract-folder-content-using-ziparchive
- loading-sql-files-from-within-php
I combined those sources and made a more powerful and easier to use extension.
Supported databases:
- MySQL
- MariaDB (via MySQL driver)
- SQLite
- PostgreSQL
Supported compression methods:
- Bzip2
- Gzip
- Zip
By default the backup files is a tar file with sql dumps and folders.
Current limitations:
- Requires a linux system.
- Currently only MySQL on localhost is supported.
- Currently only MariaDB on localhost is supported.
- Currently only PostgreSQL on localhost is supported.
Getting started
Installation
The preferred way to install this extension is through composer.
Either run
or add
to the require section of your composer.json
file.
Configuration
Once the extension is installed, add it in your config file:
Basic
Advanced
Minimal Config
Will create backup for:
directories:
/web/images/*
/web/uploads/*
database:
Yii::$app->db
Result:
/backups/2020-06-29T182436-0600_backup.tar/
>images/
>uploads/
>sql/db.sql
Advanced Config
Result:
/backups/2020-06-29T182436-0600_myapp-backup.zip/
>images/
>uploads/
>pdf/
>sql/db.sql
>sql/db1.sql
Usage
You can use this component in a console command.
/console/controllers/BackupController.php:/
All versions of yii2-backup with dependencies
ext-phar Version *
ext-pdo Version *
yiisoft/yii2 Version ~2.0.0