Example #1
0
 /**
  * @throws \BigName\BackupManager\Config\ConfigFieldNotFound
  * @throws \BigName\BackupManager\Config\ConfigNotFoundForConnection
  * @return void
  */
 private function validateArguments()
 {
     $root = $this->filesystems->getConfig($this->option('destination'), 'root');
     $this->info('Just to be sure...');
     $this->info(sprintf('Do you want to create a backup of <comment>%s</comment>, store it on <comment>%s</comment> at <comment>%s</comment> and compress it to <comment>%s</comment>?', $this->option('database'), $this->option('destination'), $root . $this->option('destinationPath'), $this->option('compression')));
     $this->line('');
     $confirmation = $this->confirm('Are these correct? [Y/n]');
     if (!$confirmation) {
         $this->reaskArguments();
     }
 }
Example #2
0
 /**
  * @return void
  */
 private function validateArguments()
 {
     $root = $this->filesystems->getConfig($this->option('source'), 'root');
     $this->info('Just to be sure...');
     $this->info(sprintf('Do you want to restore the backup <comment>%s</comment> from <comment>%s</comment> to database <comment>%s</comment> and decompress it from <comment>%s</comment>?', $root . $this->option('sourcePath'), $this->option('source'), $this->option('database'), $this->option('compression')));
     $this->line('');
     $confirmation = $this->confirm('Are these correct? [Y/n]');
     if (!$confirmation) {
         $this->reaskArguments();
     }
 }
Example #3
0
 /**
  * @return void
  */
 private function validateArguments()
 {
     $root = $this->filesystems->getConfig($this->option('source'), 'root');
     $this->info('Just to be sure...');
     $this->info(sprintf('Do you want to list files from <comment>%s</comment> on <comment>%s</comment>?', $root . $this->option('path'), $this->option('source')));
     $this->line('');
     $confirmation = $this->confirm('Are these correct? [Y/n]');
     if (!$confirmation) {
         $this->reaskArguments();
     }
 }
Example #4
0
 /**
  * @param $name
  * @throws \BigName\BackupManager\Config\ConfigFieldNotFound
  * @throws \BigName\BackupManager\Config\ConfigNotFoundForConnection
  * @return string
  */
 protected function getRootPath($name)
 {
     $path = $this->filesystems->getConfig($name, 'root');
     return preg_replace('/\\/$/', '', $path);
 }