diff --git a/client/components/tables/BackupsTable.vue b/client/components/tables/BackupsTable.vue index 380394bd..a8fbade6 100644 --- a/client/components/tables/BackupsTable.vue +++ b/client/components/tables/BackupsTable.vue @@ -171,7 +171,7 @@ export default { this.$axios .$get('/api/backups') .then((data) => { - this.$emit('loaded', data.backupLocation) + this.$emit('loaded', data) this.setBackups(data.backups || []) }) .catch((error) => { diff --git a/client/pages/config/backups.vue b/client/pages/config/backups.vue index dc14e4e1..7b64cbb2 100644 --- a/client/pages/config/backups.vue +++ b/client/pages/config/backups.vue @@ -16,11 +16,11 @@
{{ $strings.MessageBackupsLocationEditNote }}
+{{ canEditBackup ? $strings.MessageBackupsLocationEditNote : $strings.MessageBackupsLocationNoEditNote }}
http://192.168.1.1:8337
then you would put http://192.168.1.1:8337/notify
.",
"MessageBackupsDescription": "Backups include users, user progress, library item details, server settings, and images stored in /metadata/items
& /metadata/authors
. Backups do not include any files stored in your library folders.",
"MessageBackupsLocationEditNote": "Note: Updating the backup location will not move or modify existing backups",
+ "MessageBackupsLocationNoEditNote": "Note: The backup location is set through an environment variable and cannot be changed here.",
"MessageBackupsLocationPathEmpty": "Backup location path cannot be empty",
"MessageBatchQuickMatchDescription": "Quick Match will attempt to add missing covers and metadata for the selected items. Enable the options below to allow Quick Match to overwrite existing covers and/or metadata.",
"MessageBookshelfNoCollections": "You haven't made any collections yet",
diff --git a/server/controllers/BackupController.js b/server/controllers/BackupController.js
index 30defb0e..df33aa1d 100644
--- a/server/controllers/BackupController.js
+++ b/server/controllers/BackupController.js
@@ -10,7 +10,8 @@ class BackupController {
getAll(req, res) {
res.json({
backups: this.backupManager.backups.map((b) => b.toJSON()),
- backupLocation: this.backupManager.backupPath
+ backupLocation: this.backupManager.backupPath,
+ backupPathEnvSet: this.backupManager.backupPathEnvSet
})
}
diff --git a/server/managers/BackupManager.js b/server/managers/BackupManager.js
index 2749cc7c..88772c58 100644
--- a/server/managers/BackupManager.js
+++ b/server/managers/BackupManager.js
@@ -29,6 +29,10 @@ class BackupManager {
return global.ServerSettings.backupPath
}
+ get backupPathEnvSet() {
+ return !!process.env.BACKUP_PATH
+ }
+
get backupSchedule() {
return global.ServerSettings.backupSchedule
}