argument('containers'); $this->line("### Backup is starting... ###"); $this->call("backup:container", [ 'containers' => $containers]); if ($this->option('data')) { $this->call("backup:data"); } if ($this->option('mysql')) { $this->call("backup:mysql", [ '--container' => env('MYSQL_CONTAINER_NAME'), '--user' => env('MYSQL_USER'), '--password' => env('MYSQL_PASSWORD'), ]); } if ($this->option('clean')) { $files = glob(env('BACKUP_FOLDER') . '/*'); foreach($files as $file){ is_file($file) ? unlink($file) : null; } } $this->line("|-> The backup and upload process is finished."); return; } /** * Define the command's schedule. * * @param \Illuminate\Console\Scheduling\Schedule $schedule * @return void */ public function schedule(Schedule $schedule): void { // $schedule->command(static::class)->everyMinute(); } }