fix windows host access correctly

Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
szaimen 2022-05-23 17:19:23 +02:00
parent 82dd888109
commit cb24213a31
5 changed files with 31 additions and 7 deletions

View file

@ -289,6 +289,8 @@ class ConfigurationManager
$isValidPath = false;
if (str_starts_with($location, '/') && !str_ends_with($location, '/')) {
$isValidPath = true;
} elseif ($location === 'nextcloud_aio_backupdir') {
$isValidPath = true;
}
if (!$isValidPath) {
@ -312,6 +314,8 @@ class ConfigurationManager
$isValidPath = false;
if (str_starts_with($location, '/') && !str_ends_with($location, '/')) {
$isValidPath = true;
} elseif ($location === 'nextcloud_aio_backupdir') {
$isValidPath = true;
}
if (!$isValidPath) {

View file

@ -185,6 +185,10 @@ class DockerActionManager
'/',
];
if ($volume->name === 'nextcloud_aio_nextcloud_datadir' || $volume->name === 'nextcloud_aio_backupdir') {
return;
}
$firstChar = substr($volume->name, 0, 1);
if(!in_array($firstChar, $forbiddenChars)) {
$this->guzzleClient->request(

View file

@ -144,7 +144,7 @@
The folder path that you enter must start with <b>/</b> and must <b>not</b> end with <b>/</b>.<br><br>
An example for Linux is <b>/mnt/backup</b>.<br>
For macOS it may be <b>/var/backup</b>.<br>
On Windows it might be <b>/host_mnt/c/backup</b>. (This Windows example would be equivalent to 'C:\backup' on the Windows host. So you need to translate the path that you want to use into the correct format.)<br><br>
On Windows it must be <b>nextcloud_aio_backupdir</b>. You need to create the 'nextcloud_aio_backupdir' volume beforehand by following this documentation: <a href="https://github.com/nextcloud/all-in-one#how-to-run-it-on-windows"><b>click here</b></a><br><br>
⚠ Note that the backup archive must be located in a subfolder of the folder that you enter here and the subfolder which contains the archive must be named 'borg'. Otherwise will the backup container not find the backup archive!<br><br>
{% endif %}
{% else %}
@ -298,7 +298,7 @@
The folder path that you enter must start with <b>/</b> and must <b>not</b> end with <b>/</b>.<br><br>
An example for Linux is <b>/mnt/backup</b>.<br>
For macOS it may be <b>/var/backup</b>.<br>
On Windows it might be <b>/host_mnt/c/backup</b>. (This Windows example would be equivalent to 'C:\backup' on the Windows host. So you need to translate the path that you want to use into the correct format.)<br><br>
On Windows it must be <b>nextcloud_aio_backupdir</b>. You need to create the 'nextcloud_aio_backupdir' volume beforehand by following this documentation: <a href="https://github.com/nextcloud/all-in-one#how-to-run-it-on-windows"><b>click here</b></a><br><br>
{% endif %}
{% if borg_backup_host_location != "" %}