Beispiel #1
0
 /**
  * Fire command
  */
 public function fire()
 {
     $maxAgeInDays = Settings::get('max_age_in_days');
     if ($this->option('force') || $this->confirm(trans('renatio.backupmanager::lang.clean.confirm', ['days' => $maxAgeInDays]), true)) {
         $this->cleanAll($maxAgeInDays);
     } else {
         $this->info(trans('renatio.backupmanager::lang.clean.aborted'));
     }
     return true;
 }
Beispiel #2
0
 /**
  * Determine if the dump should use extended-insert.
  *
  * @return string
  */
 protected function useExtendedInsert()
 {
     return Settings::get('use_extended_insert');
 }
Beispiel #3
0
 /**
  * Save backup record
  */
 public static function saveRecord()
 {
     $backup = Session::pull('backup');
     $filePath = $backup['file_path'];
     self::create(['disk_name' => basename($filePath), 'file_path' => $filePath, 'type' => $backup['type'], 'filesystems' => implode(', ', Settings::get('filesystem'))]);
 }
Beispiel #4
0
 /**
  * Get the path to the pg_dump.
  *
  * @return string
  */
 protected function getDumpCommandPath()
 {
     return Settings::get('dump_command_path');
 }