Yii2 Backup and Restore Database ¶
Database Backup and Restore functionality
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.
Installation ¶
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.
Usage ¶
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
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.
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.
Regards,
Eduardo
Original Author should be credited
http://www.yiiframework.com/extension/yii2-backup/
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
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.