summaryrefslogtreecommitdiffstats
path: root/modules-available/backup/hooks
diff options
context:
space:
mode:
authorSimon Rettberg2023-03-08 15:38:45 +0100
committerSimon Rettberg2023-03-08 15:38:45 +0100
commite2d8c43c734adeb7c5a8ca5d90529874fcda15e0 (patch)
tree08429349f0f09ef75262df512cc57a3c63cc33c6 /modules-available/backup/hooks
parent[backup] Check supplied backup file before trying to apply (diff)
downloadslx-admin-e2d8c43c734adeb7c5a8ca5d90529874fcda15e0.tar.gz
slx-admin-e2d8c43c734adeb7c5a8ca5d90529874fcda15e0.tar.xz
slx-admin-e2d8c43c734adeb7c5a8ca5d90529874fcda15e0.zip
[backup] Add option to store in /root, not just VMstore
Diffstat (limited to 'modules-available/backup/hooks')
-rw-r--r--modules-available/backup/hooks/cron.inc.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules-available/backup/hooks/cron.inc.php b/modules-available/backup/hooks/cron.inc.php
index 529a3feb..7adbc0a4 100644
--- a/modules-available/backup/hooks/cron.inc.php
+++ b/modules-available/backup/hooks/cron.inc.php
@@ -12,6 +12,10 @@
$password = null;
}
if ($mode === BackupRestore::BACKUP_MODE_VMSTORE) {
+ if (file_exists('/srv/openslx/nfs/.notmounted')) {
+ EventLog::failure("Could not create automatic backup on VMstore as it's not mounted");
+ return;
+ }
$destination = '/srv/openslx/nfs/auto_backups/';
} else {
$destination = '/root/auto_backups/';