src/Monashee/Backup/Dump.php
public function backup($databases)
    {
        foreach ($databases as $database)
        {
            echo "\n".'dumping '.$database.' database'."\n";

            try {
                system($this->command($database));
            } catch (\Exception $e) {
                $this->event->fire('MonasheeBackupError', $e->getMessage());
                throw new \Exception('mysqldump error');
            }

            echo 'done.'."\n\n";
        }

        $this->event->fire('MonasheeBackupInfo', 'All databases done dumping.');

        return true;
    }
public function backup($databases)
    {
        foreach ($databases as $database)
        {
            echo "\n".'dumping '.$database.' database'."\n";

            try {
                system($this->command($database));
            } catch (\Exception $e) {
                $this->event->fire('MonasheeBackupError', $e->getMessage());
                throw new \Exception('mysqldump error');
            }

            echo 'done.'."\n\n";
        }

        $this->event->fire('MonasheeBackupInfo', 'All databases done dumping.');

        return true;
    }
public function backup ( $ databases ) { foreach ( $ databases as $ database ) { echo "\n" . 'dumping ' . $ database . ' database' . "\n" ; try { system ( $ this -> command ( $ database ) ) ; } catch ( \ Exception $ e ) { $ this -> event -> fire ( 'MonasheeBackupError' , $ e -> getMessage ( ) ) ; throw new \ Exception ( 'mysqldump error' ) ; } echo 'done.' . "\n\n" ; } $ this -> event -> fire ( 'MonasheeBackupInfo' , 'All databases done dumping.' ) ; return true ; }
Create backups and save to file

@param $databases
@return bool
@throws \Exception
Create backups and save to file