Git Product home page Git Product logo

Comments (22)

dizda avatar dizda commented on June 23, 2024

Hello,

Can you please format your conf, help can be found here https://guides.github.com/features/mastering-markdown/

from cloudbackupbundle.

yohann-teisseire avatar yohann-teisseire commented on June 23, 2024

githelp

from cloudbackupbundle.

Nyholm avatar Nyholm commented on June 23, 2024

What do your logs say?
Have you tried to debug this? On what line does the exception occur?

from cloudbackupbundle.

yohann-teisseire avatar yohann-teisseire commented on June 23, 2024

When i execute this command : "app/console dizda:backup:start" or this one : "php app/console --env=prod dizda:backup:start"

I have this error : "[2015-11-09 10:50:55] app.CRITICAL: [dizda-backup] Unexpected exception.
Something went terribly wrong. We could not create a backup. Read your log files to see what caused this error."

prod.log :
[2015-11-09 10:53:03] app.INFO: [dizda-backup] Dumping MySQL database [] []
[2015-11-09 10:53:03] app.CRITICAL: [dizda-backup] Unexpected exception. []
[2015-11-09 10:53:03] app.INFO: [dizda-backup] Cleaning up after us. [] []

dev.log
[2015-11-09 10:53:35] event.DEBUG: Notified event "console.command" to listener "Symfony\Component\HttpKernel\EventListener\DebugHandlersListener::configure". [] []
[2015-11-09 10:53:35] event.DEBUG: Notified event "console.command" to listener "Symfony\Bridge\Monolog\Handler\ConsoleHandler::onCommand". [] []
[2015-11-09 10:53:35] app.INFO: [dizda-backup] Dumping MySQL database [] []
[2015-11-09 10:53:35] app.CRITICAL: [dizda-backup] Unexpected exception. []
[2015-11-09 10:53:35] app.INFO: [dizda-backup] Cleaning up after us. [] []
[2015-11-09 10:53:35] event.DEBUG: Notified event "console.terminate" to listener "Symfony\Bundle\SwiftmailerBundle\EventListener\EmailSenderListener::onTerminate". [] []
[2015-11-09 10:53:35] event.DEBUG: Notified event "console.terminate" to listener "Symfony\Bridge\Monolog\Handler\ConsoleHandler::onTerminate". [] []

thanks,

from cloudbackupbundle.

yohann-teisseire avatar yohann-teisseire commented on June 23, 2024

I think my way is wrong but i don't know which way is the good one.
in : cloud_storages.local.path: C:\wamp\www\trunkRefonte
or : knp_gaufrette.adapters.foo.local.directory: 'C:\wamp\www\trunkRefonte'

from cloudbackupbundle.

Nyholm avatar Nyholm commented on June 23, 2024

Start debugging MySQL.php on line 55 and see where it crashes.

@dizda I believe we need to start throwing a lot more (and different kind of) exceptions.

from cloudbackupbundle.

yohann-teisseire avatar yohann-teisseire commented on June 23, 2024

When i dump getCommand in mysql.php
var_dump($this->getCommand());die;

i have this:
string(91) "mysqldump -uroot symfony > C:\wamp\www\trunkRefonte\app\cache\prod/backup/mysql/symfony.sql"

from cloudbackupbundle.

yohann-teisseire avatar yohann-teisseire commented on June 23, 2024

Now i have this error :
[2015-11-09 11:29:02] app.INFO: [dizda-backup] Dumping MySQL database [] []
[2015-11-09 11:29:02] app.INFO: [dizda-backup] Copying folders. [] []
[2015-11-09 11:29:02] app.INFO: [dizda-backup] Compressing to archive using Tar [] []
[2015-11-09 11:29:02] app.CRITICAL: [dizda-backup] Unexpected exception. []
[2015-11-09 11:29:02] app.INFO: [dizda-backup] Cleaning up after us. [] []

It's better than before

from cloudbackupbundle.

dizda avatar dizda commented on June 23, 2024

@Nyholm Agree. Unexpected exception is a way too large.

from cloudbackupbundle.

Nyholm avatar Nyholm commented on June 23, 2024

@yohann-teisseire What did you change?

from cloudbackupbundle.

yohann-teisseire avatar yohann-teisseire commented on June 23, 2024

In Database.php
$this->dataPath = $basePath.static::DB_PATH.'/';
//$this->dataPath = "C:/wamp/www/trunkRefonte/app/cache/".static::DB_PATH.'/';

$this->dataPath = C:\wamp\www\trunkRefonte\app\cache\prod/backup/mysql/symfony.sql"
Should be C:/wamp/www/trunkRefonte/app/cache/prod/backup/mysql/symfony.sql"

from cloudbackupbundle.

yohann-teisseire avatar yohann-teisseire commented on June 23, 2024

In Database.php, when i dump this function, send null
protected function preparePath()
{
$this->filesystem->mkdir($this->dataPath);
}

from cloudbackupbundle.

Nyholm avatar Nyholm commented on June 23, 2024

Yeah, I figured it had something to do with windows =)

PS. When pasting code in you should use the "backticks". See under Syntax highlitning

from cloudbackupbundle.

yohann-teisseire avatar yohann-teisseire commented on June 23, 2024

Yeah, i use windows, so now my problem is just after "Compressing to archive using Tar"

from cloudbackupbundle.

yohann-teisseire avatar yohann-teisseire commented on June 23, 2024

When i add a var_dump " var_dump($this->getCommand());die;", i have a folder created in "app/cache/prod/backup/mysql" but it's empty, without var_dump, the folder isn't created.

/**
 * {@inheritdoc}
 */
public function dump()
{
    $this->preparePath();
    var_dump($this->getCommand());die;
}

/**
 * {@inheritdoc}
 */
protected function getCommand()
{
    $this->dataPath = ' C:/wamp/www/trunkRefonte/app/cache/prod/backup/';
    return sprintf('mysqldump %s %s > %s',
        $this->auth,
        $this->database,
        $this->dataPath.$this->fileName);
}

from cloudbackupbundle.

yohann-teisseire avatar yohann-teisseire commented on June 23, 2024

After multiple dump, preparePath send 'null', i think the problem is here.

/**
 * {@inheritdoc}
 */
public function dump()
{
    $this->preparePath();
    $this->getCommand();
}

from cloudbackupbundle.

yohann-teisseire avatar yohann-teisseire commented on June 23, 2024

I have put my symfony app on my server, now it's better, errors of yesterday have disappeared.
my console errors :
PHP Warning: copy(http://recette.potentielettalents.com/web/uploads/hostname_2015-11-10_11-55-48.tar): failed to open stream: HTTP wrapper does not support writeable connections in /var/www/html/recette/vendor/dizda/cloud-backup-bundle/Dizda/CloudBackupBundle/Client/LocalClient.php on line 30
PHP Fatal error: Class 'Dizda\CloudBackupBundle\Client\Exception' not found in /var/www/html/recette/vendor/dizda/cloud-backup-bundle/Dizda/CloudBackupBundle/Client/LocalClient.php on line 32
[2015-11-10 11:55:49] php.CRITICAL: Fatal Error: Class 'Dizda\CloudBackupBundle\Client\Exception' not found {"type":1,"file":"/var/www/html/recette/vendor/dizda/cloud-backup-bundle/Dizda/CloudBackupBundle/Client/LocalClient.php","line":32,"level":6143,"stack":[]}

I think i'm very close now

from cloudbackupbundle.

dizda avatar dizda commented on June 23, 2024

You've can not copy to a HTTP url, you should provide the local path of the server.

from cloudbackupbundle.

yohann-teisseire avatar yohann-teisseire commented on June 23, 2024

i have put : path: 'var/www/html/recette/web/uploads', but the issue is still the same

PHP Warning: copy(var/www/html/recette/web/uploads/hostname_2015-11-10_12-05-46.tar): failed to open stream: No such file or directory in /var/www/html/recette/vendor/dizda/cloud-backup-bundle/Dizda/CloudBackupBundle/Client/LocalClient.php on line 30
PHP Fatal error: Class 'Dizda\CloudBackupBundle\Client\Exception' not found in /var/www/html/recette/vendor/dizda/cloud-backup-bundle/Dizda/CloudBackupBundle/Client/LocalClient.php on line 32
[2015-11-10 12:05:46] php.CRITICAL: Fatal Error: Class 'Dizda\CloudBackupBundle\Client\Exception' not found {"type":1,"file":"/var/www/html/recette/vendor/dizda/cloud-backup-bundle/Dizda/CloudBackupBundle/Client/LocalClient.php","line":32,"level":6143,"stack":[]}

[Symfony\Component\Debug\Exception\ClassNotFoundException]
Attempted to load class "Exception" from namespace "Dizda\CloudBackupBundle\Client".
Did you forget a "use" statement for e.g. "Gaufrette\Exception", "Assetic\Exception\Exception", "Symfony\Compo
nent\Serializer\Exception\Exception", "Symfony\Component\Config\Definition\Exception\Exception", "Symfony\Comp
onent\Security\Acl\Exception\Exception" or "Ivory\CKEditorBundle\Exception\Exception"?

from cloudbackupbundle.

dizda avatar dizda commented on June 23, 2024

Ok 2 things, you've forget a slash in front of your path, it should be /var/www/html/recette/web/uploads.

Then, you just pointed out an error on LocalClient file, https://github.com/dizda/CloudBackupBundle/blob/master/Client/LocalClient.php#L32 should be \Exception with an anti-slash.

from cloudbackupbundle.

yohann-teisseire avatar yohann-teisseire commented on June 23, 2024

Great, my backup is ok.

thank you very much to both of you for your help

from cloudbackupbundle.

dizda avatar dizda commented on June 23, 2024

FYI https://github.com/dizda/CloudBackupBundle/releases/tag/3.2.1 released for the exception's namespace.

from cloudbackupbundle.

Related Issues (20)

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.