error('Backup disk not configured.'); $this->error('See https://docs.pixelfed.org/technical-documentation/env.html#filesystem for more information.'); return Command::FAILURE; } $newest = $backupDestination->newestBackup(); $name = $newest->path(); $parts = explode('/', $name); $fileName = array_pop($parts); $storagePath = 'backups'; $path = storage_path('app/'. $name); $file = $cloudDisk->putFileAs($storagePath, new File($path), $fileName, 'private'); $this->info("Backup file successfully saved!"); $url = $cloudDisk->url($file); $this->table( ['Name', 'URL'], [ [$fileName, $url] ], ); return Command::SUCCESS; } }