diff --git a/configs/backup/backup_engine b/configs/backup/backup_engine index c98c168..e2465a5 100644 --- a/configs/backup/backup_engine +++ b/configs/backup/backup_engine @@ -1,7 +1,7 @@ # ================================================================================ # Backup Engine - **ADVANCED** Engine-level knobs most users won't need to touch # ================================================================================ -CFG_BACKUP_ENGINE=restic # Default Backup Engine - Fallback engine for new locations (each location can override) [restic:restic|borg:BorgBackup|kopia:Kopia] +CFG_BACKUP_ENGINE=restic # Default Backup Engine - Fallback engine for new locations (each location can override) [restic:Restic|borg:BorgBackup|kopia:Kopia] CFG_BACKUP_STRATEGY=stop-snapshot-start # Backup Strategy - How containers are quiesced before snapshotting [stop-snapshot-start:Stop → snapshot → start (safe default)|pause-snapshot-unpause:Pause → snapshot → unpause (less downtime)|live:Live — snapshot while running (only with DB dump hooks)] CFG_BACKUP_VERIFY_AFTER=true # Verify After Backup - Run integrity check after each backup CFG_BACKUP_VERIFY_DATA_PERCENT=5 # Verify Data Sample % - Percentage of repo data to checksum-verify weekly diff --git a/configs/backup/locations/1/location.config b/configs/backup/locations/1/location.config index c30ec1b..ca13327 100644 --- a/configs/backup/locations/1/location.config +++ b/configs/backup/locations/1/location.config @@ -2,7 +2,7 @@ # Edit via the Locations page on /backup, or directly here. CFG_BACKUP_LOC_1_NAME="Local disk" # Location Name - Friendly label shown in the UI CFG_BACKUP_LOC_1_ENABLED=true # Enabled - Snapshot to this location -CFG_BACKUP_LOC_1_ENGINE=restic # Engine - Backup engine used at this location [restic:restic|borg:BorgBackup|kopia:Kopia] +CFG_BACKUP_LOC_1_ENGINE=restic # Engine - Backup engine used at this location [restic:Restic|borg:BorgBackup|kopia:Kopia] CFG_BACKUP_LOC_1_PASSWORD=RANDOMIZEDPASSWORD1 # Repository Password - Used to encrypt/decrypt snapshots — back up offline! CFG_BACKUP_LOC_1_TYPE=local # Type - Backend [local:Local / mounted path|sftp:SFTP|rest:REST|s3:S3|b2:Backblaze B2|gs:Google Cloud Storage|azure:Azure|rclone:rclone] CFG_BACKUP_LOC_1_PATH_MODE=auto # Path Mode - Where this location stores its data [auto:Automatic (/docker/backups/)|custom:Custom path] diff --git a/containers/libreportal/frontend/js/components/backup/backup-page.js b/containers/libreportal/frontend/js/components/backup/backup-page.js index 7c76b35..ec586c5 100644 --- a/containers/libreportal/frontend/js/components/backup/backup-page.js +++ b/containers/libreportal/frontend/js/components/backup/backup-page.js @@ -296,12 +296,12 @@ class BackupPage { // Fallback so the dropdown never collapses to empty if the regen // hasn't run yet — restic is always assumed available. if (!this.engines.length) { - this.engines = [{ id: 'restic', name: 'restic', supported_types: ['local','sftp','rest','s3','b2','gs','azure','rclone'] }]; + this.engines = [{ id: 'restic', name: 'Restic', supported_types: ['local','sftp','rest','s3','b2','gs','azure','rclone'] }]; } } engineDisplayName(id) { - if (!id) return 'restic'; + if (!id) return 'Restic'; const match = (this.engines || []).find(e => e.id === id); return match?.name || id; } @@ -766,9 +766,18 @@ class BackupPage { const compatible = this.enginesForType(type); if (!compatible.length) return; - const want = compatible.find(e => e.id === preferred)?.id || compatible[0].id; - select.innerHTML = compatible - .map(e => ``) + // Float the system-default engine (CFG_BACKUP_ENGINE) to the top and + // tag it "(default)" so it's the obvious pick for new locations. + const defaultId = (window.systemConfigs?.CFG_BACKUP_ENGINE || 'restic').trim(); + const rank = e => (e.id === defaultId ? 0 : 1); + const ordered = [...compatible].sort((a, b) => rank(a) - rank(b)); + + const want = ordered.find(e => e.id === preferred)?.id || ordered[0].id; + select.innerHTML = ordered + .map(e => { + const label = (e.name || e.id) + (e.id === defaultId ? ' (default)' : ''); + return ``; + }) .join(''); select.value = want; } diff --git a/containers/libreportal/frontend/js/components/config/config-options.js b/containers/libreportal/frontend/js/components/config/config-options.js index 78a7c21..e781967 100755 --- a/containers/libreportal/frontend/js/components/config/config-options.js +++ b/containers/libreportal/frontend/js/components/config/config-options.js @@ -257,7 +257,7 @@ class ConfigOptions { { value: 'custom', label: 'Custom path' } ], ENGINE: [ - { value: 'restic', label: 'restic' }, + { value: 'restic', label: 'Restic' }, { value: 'borg', label: 'BorgBackup' }, { value: 'kopia', label: 'Kopia' } ], diff --git a/scripts/backup/engines/restic.json b/scripts/backup/engines/restic.json index b3e5df6..e89b21d 100644 --- a/scripts/backup/engines/restic.json +++ b/scripts/backup/engines/restic.json @@ -1,6 +1,6 @@ { "id": "restic", - "name": "restic", + "name": "Restic", "tagline": "Modern encrypted backup with native deduplication.", "logo": "/icons/config/backup.svg", "supported_types": ["local", "sftp", "rest", "s3", "b2", "gs", "azure", "rclone"], diff --git a/scripts/backup/locations/location_add.sh b/scripts/backup/locations/location_add.sh index 66593e4..e6c92ef 100644 --- a/scripts/backup/locations/location_add.sh +++ b/scripts/backup/locations/location_add.sh @@ -32,7 +32,7 @@ locationAdd() echo "# Edit via the Locations page on /backup, or directly here." echo "CFG_BACKUP_LOC_${idx}_NAME=\"${name}\" # Location Name - Friendly label shown in the UI" echo "CFG_BACKUP_LOC_${idx}_ENABLED=false # Enabled - Snapshot to this location" - echo "CFG_BACKUP_LOC_${idx}_ENGINE=${default_engine} # Engine - Backup engine used at this location [restic:restic|borg:BorgBackup|kopia:Kopia]" + echo "CFG_BACKUP_LOC_${idx}_ENGINE=${default_engine} # Engine - Backup engine used at this location [restic:Restic|borg:BorgBackup|kopia:Kopia]" echo "CFG_BACKUP_LOC_${idx}_PASSWORD=RANDOMIZEDPASSWORD1 # Repository Password - Used to encrypt/decrypt snapshots — back up offline!" echo "CFG_BACKUP_LOC_${idx}_TYPE=${type} # Type - Backend [local:Local / mounted path|sftp:SFTP|rest:REST|s3:S3|b2:Backblaze B2|gs:Google Cloud Storage|azure:Azure|rclone:rclone]" echo "CFG_BACKUP_LOC_${idx}_PATH_MODE=${default_path_mode} # Path Mode - Where this location stores its data [auto:Automatic (/docker/backups/)|custom:Custom path]"