library/Garp/Content/Db/Server/Abstract.php
public function backup() {
        $dbConfigParams     = $this->getDbConfigParams();
        $backupDir          = $this->getBackupDir();
        $environment        = $this->getEnvironment();

        if (!$this->databaseExists()) {
            return;
        }

        $createBackupDir    = new Garp_Shell_Command_CreateDir($backupDir);
        $dumpToFile         = new Garp_Shell_Command_DumpDatabaseToFile($dbConfigParams, $backupDir, $environment);

        $this->shellExec($createBackupDir);
        $this->shellExec($dumpToFile);

        /**
         * @todo: verifiëren of:
         *          - backupbestand bestaat
         *          - backupbestand meer dan 0 bytes heeft
         */
    }
public function backup() {
        $dbConfigParams     = $this->getDbConfigParams();
        $backupDir          = $this->getBackupDir();
        $environment        = $this->getEnvironment();

        if (!$this->databaseExists()) {
            return;
        }

        $createBackupDir    = new Garp_Shell_Command_CreateDir($backupDir);
        $dumpToFile         = new Garp_Shell_Command_DumpDatabaseToFile($dbConfigParams, $backupDir, $environment);

        $this->shellExec($createBackupDir);
        $this->shellExec($dumpToFile);

        /**
         * @todo: verifiëren of:
         *          - backupbestand bestaat
         *          - backupbestand meer dan 0 bytes heeft
         */
    }
public function backup ( ) { $ dbConfigParams = $ this -> getDbConfigParams ( ) ; $ backupDir = $ this -> getBackupDir ( ) ; $ environment = $ this -> getEnvironment ( ) ; if ( ! $ this -> databaseExists ( ) ) { return ; } $ createBackupDir = new Garp_Shell_Command_CreateDir ( $ backupDir ) ; $ dumpToFile = new Garp_Shell_Command_DumpDatabaseToFile ( $ dbConfigParams , $ backupDir , $ environment ) ; $ this -> shellExec ( $ createBackupDir ) ; $ this -> shellExec ( $ dumpToFile ) ; /**
         * @todo: verifiëren of:
         *          - backupbestand bestaat
         *          - backupbestand meer dan 0 bytes heeft
         */ }
Backs up the database and writes it to a file on the server itself.
Backs up the database and writes it to a file on the server itself .