Yii 2.0: yii2-backuprestore

Yii2 Backup and Restore

Yii2 Backup and Restore Database

Database Backup and Restore functionality

how should look


Link to a simple demo

This extension is base in: https://github.com/spanjeta/yii2-backup and other yii1 similar backup-restore extensions I converted to yii2 and made it more intuitive using the Kartik extensions.


Requirements I am usin some Kartik extensions that you will need to install and configure in order to work: php composer.phar require kartik-v/yii2-grid "" php composer.phar require kartik-v/yii2-widget-fileinput ""

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist open-ecommerce/yii2-backuprestore "dev-master"

or add

"open-ecommerce/yii2-backuprestore": "dev-master"

to the require section of your composer.json file.


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

Basic config/web.php

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

> 'backuprestore' => [ 'class' => '\oe\modules\backuprestore\Module', //'layout' => '@admin-views/layouts/main', or what ever layout you use ... ... ],

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

Pretty Url's /backuprestore

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

more info at: https://github.com/open-ecommerce/yii2-backuprestore

You can always find us at: Open-ecommerce.org

Total 4 comments

#19788 report it
jwerner at 2016/02/25 03:31pm
Nice Extension!

Thanks for this nice extension!

However, for the delete and restore actions in the DefaultController, I had to replace $_GET[0] with $_GET[1].

Also, in the grid view, a JavaScript Confirm popup before deleting a backup or restoring a backup file would be nice.

Regards Joachim

#19769 report it
shiv at 2016/02/05 03:48am
Original Author should be credited


#19211 report it
open-ecommerce.org at 2015/04/16 09:45am
DefaultController.php coding errors

I checked the extension and dosn't bring any errors probably never uses this function.

I will have a look later if you want to collaborate with the project you are more than welcome.



#19210 report it
Lloyd at 2015/04/16 09:13am
DefaultController.php coding errors

I was wondering why you have not responded to the following issue I added to your github repository for this extension:

Will review your code I found the following coding errors in the DefaultController.php:

line 47 } catch (CDbException $e) { - CDbException is a part of yii1 and this line needs to be updated to use the Yii2 method

line 250 throw new CHttpException(404, Yii::t('app', 'File not found')); - CHttpException is a part of yii1 and this line needs to be updated to use the Yii2 method

I was wondering you are planning to maintain this extension, or we are left to figure out and modify the problems are selves.

Leave a comment

Please to leave your comment.

Create extension