mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 06:26:57 +00:00
make the instance restore process better understandable
Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
parent
6037b4402b
commit
d288bdd023
7 changed files with 80 additions and 57 deletions
|
|
@ -334,6 +334,7 @@ class ConfigurationManager
|
|||
$config = $this->GetConfig();
|
||||
$config['borg_backup_host_location'] = $location;
|
||||
$config['borg_restore_password'] = $password;
|
||||
$config['instance_restore_attempt'] = 1;
|
||||
$this->WriteConfig($config);
|
||||
}
|
||||
|
||||
|
|
@ -422,6 +423,18 @@ class ConfigurationManager
|
|||
return $config['borg_restore_password'];
|
||||
}
|
||||
|
||||
public function isInstanceRestoreAttempt() : bool {
|
||||
$config = $this->GetConfig();
|
||||
if(!isset($config['instance_restore_attempt'])) {
|
||||
$config['instance_restore_attempt'] = '';
|
||||
}
|
||||
|
||||
if ($config['instance_restore_attempt'] === 1) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function GetBorgBackupMode() : string {
|
||||
$config = $this->GetConfig();
|
||||
if(!isset($config['backup-mode'])) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue