mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 06:26:57 +00:00
instance-restore: make sure that the configured borg restore location is not a children of or equal to NEXTCLOUD_DATADIR
Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
parent
17382f1f1f
commit
3e9ce2be05
1 changed files with 6 additions and 1 deletions
|
|
@ -484,8 +484,13 @@ class ConfigurationManager
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$isValidPath) {
|
if (!$isValidPath) {
|
||||||
throw new InvalidSettingConfigurationException("The path must start with '/', and must not end with '/'!");
|
throw new InvalidSettingConfigurationException("The path must start with '/', and must not end with '/'! Another option is to use the docker volume name 'nextcloud_aio_backupdir'.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (str_starts_with($location, rtrim($this->GetNextcloudDatadirMount(), '/'))) {
|
||||||
|
throw new InvalidSettingConfigurationException("The path must not be a children of or equal to NEXTCLOUD_DATADIR, which is currently set to " . $this->GetNextcloudDatadirMount());
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$this->ValidateBorgRemoteRepo($repo);
|
$this->ValidateBorgRemoteRepo($repo);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue