Giter VIP home page Giter VIP logo

yii2-db-manager's People

Contributors

beaten-sect0r avatar gogl92 avatar huiyang avatar ignatenkovnikita avatar insolita avatar kwazaro avatar nick-denry avatar spell6inder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

yii2-db-manager's Issues

Empty database file created

Hello, my sql file is empty i am using following config:
i am using my alias from bootstrap.php
Yii::setAlias('@backup', dirname(dirname(__DIR__)) . '/backup');

in config/main.php

'modules' => [
        'db-manager' => [
            'class' => 'bs\dbManager\Module',
            'path' => '@backup',
            'dbList' => ['db'],
            'as access' => [
                'class' => 'yii\filters\AccessControl',
                'rules' => [
                    [
                        'allow' => true,
                        'roles' => ['@'],
                    ],
                ],
            ],
        ],

in console config

'modules' => [
        'db-manager' => [
            'class' => 'bs\dbManager\Module',
            // path to directory for the dumps
            'path' => '@backup',
            // list of registerd db-components
            'dbList' => ['db'],
        ],
    ],

i am getting result :

php yii dump/create -db=db -gz -s
Storage component is not configured.
Dump successfully created.

gzip file is created but with 0b size

problem with db password

There is a problem with db passwords like 4iN8@Ud71&EToWEF - it contains characters: @ & and dump failed :(
All passwords in command:
PGPASSWORD='4iN8@Ud71&EToWEF' pg_dump --host=
needs to be in inverted commas

Бекап по крону

Есть ли возможность сделать бекап по крону?
Если есть - то добавить пример по крону.

Empty file from database

When i select database component (db) and click button. It's show 0 byte file.
my backend/config/main.php is

'db-manager' => [
            'class' => 'bs\dbManager\Module',
            // path to directory for the dumps
            'path' => '@webroot/backups',
            // list of registerd db-components
            'dbList' => ['db'],
            // additional mysqldump/pg_dump presets (available for choosing in dump and restore forms)
            /*'customDumpOptions' => [
                'mysqlForce' => '--force',
                'somepreset' => '--triggers --single-transaction',
                'pgCompress' => '-Z2 -Fc',
            ],
            'customRestoreOptions' => [
                'mysqlForce' => '--force',
                'pgForce' => '-f -d',
            ],*/
            // options for full customizing default command generation
            //'mysqlManagerClass' => 'CustomClass',
            //'postgresManagerClass' => 'CustomClass',
            // option for add additional DumpManagers
            /*'createManagerCallback' => function ($dbInfo) {
                if ($dbInfo['dbName'] == 'exclusive') {
                    return new MyExclusiveManager;
                } else {
                    return false;
                }
            },*/
            'as access' => [
                'class' => 'yii\filters\AccessControl',
                'ruleConfig' => [
                    'class' => KpiRule::className(),
                ],
                'rules' => [
                    [
                        'allow' => true,
                        'roles' => [User::ROLE_ADMIN],
                    ],
                ],
            ],
        ],

Dump failed

Dump failed.
Command - mysqldump --host=localhost --port=3306 --user=root --password= --no-data advoapp | gzip > C:\wamp\www\advoapp/backend/backups/advoapp_schema_default_2017-06-16_06-13-53.sql.gz
'mysqldump' is not recognized as an internal or external command, operable program or batch file.

image

gZip сжатие - пустой файл

День добрый! Модуль прекрасно работает, но при выборе опции gZip сжатия сохраняется пустой файл, в чём может быть проблема?

mysqldump: Got error: 1045: Access denied for user

На OpenServer возникала указанная ошибка, в файле MysqlDumpManager.php пришлось изменить строку:
"--password='{$dbInfo['password']}'",
на
'--password='.$dbInfo['password'],

Include directory in backup

I need to backup my database and a directory with pdf files that are referenced from the database.

How can this be done using this excellent extension?

Unhelpful error message: Path is not writable! Check chmod!

When trying to get the help for the yii2 console commands on a server, I ran this:

$ yii help

and was greeted with this error message:

Error: Path is not writable! Check chmod!

This message tells me some path is not writeable, but critically, it does not actually tell me which path it tried to write, making solving the issue harder than it needs to be.

I traced it down to this file:
https://github.com/Beaten-Sect0r/yii2-db-manager/blob/master/src/Module.php#L142

You have the path available here, so please mention it in the error message.

Forbidden

Help!
When i try to access to /db-manager, it throws me forbidden expection (403)

Possibility to specify file dump name

As a developer I want to store my dump file with a custom name, for example I want to execute:

php yii dump/create -db=db -s -f=database/backups/backup.sql

and get:

database/backups/backup.sql

custom timeout on dump/create

I have a large database that takes more than 60 seconds to backup.
Is it possible to add custom timeout to prevent this to happen?
For now i have to edit manualy DumpController.php to change this...
Offending line : 73 version: 2.2.1.
By the way: great job!

Event after backup

Есть необходимость сделать определенные действия после бекапа.
Например

  1. Есть два сайта со схожей стуктурой бд.
  2. На первом через крон делается бекап одинаковых твблиц #6
  3. Затем запускается процесс передачи бекапа по фтп на другой сайт
  4. На втором также через крон #5 происходит обновление таблиц из нового бекапа.

Пример взят из практики, и реализован на sypexDumper.

In docker , How to do?

php service in one container,
mysql service in another container,

Use your code , in php container cant use mysqldump to backup db?

Please to improve,thank you !

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.