mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-19 22:16:49 +00:00
add borgbackup-viewer community container
Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
parent
c19ba34cdf
commit
7468386397
5 changed files with 103 additions and 3 deletions
|
|
@ -541,19 +541,23 @@ readonly class DockerActionManager {
|
|||
$mounts = [];
|
||||
|
||||
// Special things for the backup container which should not be exposed in the containers.json
|
||||
if ($container->GetIdentifier() === 'nextcloud-aio-borgbackup') {
|
||||
if (str_starts_with($container->GetIdentifier(), 'nextcloud-aio-borgbackup')) {
|
||||
// Additional backup directories
|
||||
foreach ($this->getAllBackupVolumes() as $additionalBackupVolumes) {
|
||||
if ($additionalBackupVolumes !== '') {
|
||||
$mounts[] = ["Type" => "volume", "Source" => $additionalBackupVolumes, "Target" => "/nextcloud_aio_volumes/" . $additionalBackupVolumes, "ReadOnly" => false];
|
||||
}
|
||||
}
|
||||
|
||||
// Make volumes read only in case of borgbackup container. The viewer makes them writeable
|
||||
$isReadOnly = $container->GetIdentifier() === 'nextcloud-aio-borgbackup';
|
||||
|
||||
foreach ($this->configurationManager->GetAdditionalBackupDirectoriesArray() as $additionalBackupDirectories) {
|
||||
if ($additionalBackupDirectories !== '') {
|
||||
if (!str_starts_with($additionalBackupDirectories, '/')) {
|
||||
$mounts[] = ["Type" => "volume", "Source" => $additionalBackupDirectories, "Target" => "/docker_volumes/" . $additionalBackupDirectories, "ReadOnly" => true];
|
||||
$mounts[] = ["Type" => "volume", "Source" => $additionalBackupDirectories, "Target" => "/docker_volumes/" . $additionalBackupDirectories, "ReadOnly" => $isReadOnly];
|
||||
} else {
|
||||
$mounts[] = ["Type" => "bind", "Source" => $additionalBackupDirectories, "Target" => "/host_mounts" . $additionalBackupDirectories, "ReadOnly" => true, "BindOptions" => ["NonRecursive" => true]];
|
||||
$mounts[] = ["Type" => "bind", "Source" => $additionalBackupDirectories, "Target" => "/host_mounts" . $additionalBackupDirectories, "ReadOnly" => $isReadOnly, "BindOptions" => ["NonRecursive" => true]];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -504,6 +504,9 @@
|
|||
{% endif %}
|
||||
|
||||
{% if has_backup_run_once == true %}
|
||||
<h3>Backup Viewer</h3>
|
||||
<p>There is now a community container that allows to access your backups in a web session. See <a href="https://github.com/nextcloud/all-in-one/tree/main/community-containers/borgbackup-viewer"><strong>this documentation</strong></a>.</p>
|
||||
|
||||
<h3>Backup check</h3>
|
||||
<p>Click on the button below to perform a backup integrity check. This is an option that verifies that your backup is intact. It shouldn't be needed in most situations.</p>
|
||||
<form method="POST" action="/api/docker/backup-check" class="xhr">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue