<?php
namespace Moto\System\Backup\Step; use Moto; use Carbon\Carbon; class DoneStep extends Moto\System\Backup\Step\AbstractStep { public function handle($backup) { $destination = '@websiteBackupDir/' . date('Ym') . '/mt-backup_full_' . Moto\Version::getCurrentBuild() . '_' . Moto\Version::getCurrentVersion() . '__' . date('Ymdhis') . '-' . md5(Moto\Util::generateRandomBytes(8)) . '.zip'; if (!$backup->moveArchiveFile($destination)) { return $this->returnError([ 'message' => 'Cant move archive file', ]); } Moto\Util::deleteDir($backup->getAbsoluteTempPath()); return $this->returnCompleted(); } } 