diff --git a/src/js/main.js b/src/js/main.js index b5c684064..47486e29c 100644 --- a/src/js/main.js +++ b/src/js/main.js @@ -89,9 +89,17 @@ angular.module('Application').controller('MainController', ['$scope', '$route', if (backupConfig.provider === 'noop') { var actionScope = $scope.$new(true); - actionScope.action = '/#/settings'; + actionScope.action = '/#/backups'; Client.notify('Backup Configuration', 'Cloudron backups are disabled. Ensure the server is backed up using alternate means.', false, 'info', actionScope); + } else if (backupConfig.provider === 'filesystem' && !backupConfig.externalDisk) { + var actionScope = $scope.$new(true); + actionScope.action = '/#/backups'; + + Client.notify('Backup Configuration', + 'Cloudron backups are currently on the same disk as the Cloudron server instance. This is dangerous and can lead to complete data loss if the disk fails.' + + 'Please setup an external backup storage (or use server snapshots) and confirm this in backup configuration', + false /* persistent */, 'info', actionScope); } }); } diff --git a/src/views/backups.js b/src/views/backups.js index 988e2c5fa..3cd87142d 100644 --- a/src/views/backups.js +++ b/src/views/backups.js @@ -332,19 +332,6 @@ angular.module('Application').controller('BackupsController', ['$scope', '$locat if (error) return console.error(error); $scope.backupConfig = backupConfig; - - Client.clearNotifications(); - - // Check if a proper storage backend is configured. TODO: this check fails if /var/backups is actually external - if (backupConfig.provider === 'filesystem' && !backupConfig.externalDisk) { - var actionScope = $scope.$new(true); - actionScope.action = '/#/backups'; - - Client.notify('Backup Configuration', - 'Cloudron backups are currently on the same disk as the Cloudron server instance. This is dangerous and can lead to complete data loss if the disk fails.' + - 'Please setup an external backup storage (or use server snapshots) and confirm this in backup configuration', - true /* persistent */, 'error', actionScope); - } }); }