diff --git a/src/Commands/CreateCommand.php b/src/Commands/CreateCommand.php index 11951fb..55d2f1b 100644 --- a/src/Commands/CreateCommand.php +++ b/src/Commands/CreateCommand.php @@ -199,7 +199,7 @@ public function create($options = ['env' => null, 'element' => null, 'framework' $env->getBackups()->create($options); $message = 'Creating a backup of the {element} for {site_env}.'; } else { - $env->getBackups()->create($options)->wait(); + $env->getBackups()->create($options)->checkProgress(); $message = 'Created a backup of the {element} for {site_env}.'; } $this->log()->notice($message, [ diff --git a/src/Commands/GetCommand.php b/src/Commands/GetCommand.php index 987fb93..c4dc402 100644 --- a/src/Commands/GetCommand.php +++ b/src/Commands/GetCommand.php @@ -35,7 +35,7 @@ class GetCommand extends TerminusCommand implements SiteAwareInterface * * @usage terminus backup-all:get * Displays the URL for the most recent files backup of all site environments. - * @usage terminus backup-all:get --element=code + * @usage terminus backup-all:get --element= * Displays the URL for the most recent code backup of all site environments. * @usage terminus backup-all:get --framework= * Displays the URL for the most recent files backups of specific frameworks only in all site environments. @@ -100,7 +100,7 @@ public function getBackup(array $options = ['env' => null, 'element' => null, 'f $fw = $site['framework']; if ($environments = $this->getSite($site['name'])->getEnvironments()->serialize()) { foreach ($environments as $environment) { - if ($environment['initialized'] == 'true') { + if ($environment['initialized']) { $show = !isset($options['env']) ? true : ($environment['id'] == $options['env']); if ($show && !empty($framework) && !in_array($fw, $framework)) { $show = false; @@ -139,14 +139,14 @@ public function getBackup(array $options = ['env' => null, 'element' => null, 'f $backup_date = date('Y-m-d', $backup->getDate()); if ($backup_date >= $lower and $backup_date <= $upper) { $rows[] = [ - 'url' => $backup->getUrl(), + 'url' => $backup->getArchiveURL(), ]; } } } else { $backup = array_shift($backups); $rows[] = [ - 'url' => $backup->getUrl(), + 'url' => $backup->getArchiveURL(), ]; } }