Compare commits
2 Commits
9ef3247246
...
e00dd0e887
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e00dd0e887 | ||
|
|
4e0b057277 |
@ -1,7 +1,7 @@
|
|||||||
# ================================================================================
|
# ================================================================================
|
||||||
# Backup Engine - **ADVANCED** Engine-level knobs most users won't need to touch
|
# 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_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_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
|
CFG_BACKUP_VERIFY_DATA_PERCENT=5 # Verify Data Sample % - Percentage of repo data to checksum-verify weekly
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
# Edit via the Locations page on /backup, or directly here.
|
# 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_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_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_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_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/<id>)|custom:Custom path]
|
CFG_BACKUP_LOC_1_PATH_MODE=auto # Path Mode - Where this location stores its data [auto:Automatic (/docker/backups/<id>)|custom:Custom path]
|
||||||
|
|||||||
@ -296,12 +296,12 @@ class BackupPage {
|
|||||||
// Fallback so the dropdown never collapses to empty if the regen
|
// Fallback so the dropdown never collapses to empty if the regen
|
||||||
// hasn't run yet — restic is always assumed available.
|
// hasn't run yet — restic is always assumed available.
|
||||||
if (!this.engines.length) {
|
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) {
|
engineDisplayName(id) {
|
||||||
if (!id) return 'restic';
|
if (!id) return 'Restic';
|
||||||
const match = (this.engines || []).find(e => e.id === id);
|
const match = (this.engines || []).find(e => e.id === id);
|
||||||
return match?.name || id;
|
return match?.name || id;
|
||||||
}
|
}
|
||||||
@ -766,9 +766,18 @@ class BackupPage {
|
|||||||
const compatible = this.enginesForType(type);
|
const compatible = this.enginesForType(type);
|
||||||
if (!compatible.length) return;
|
if (!compatible.length) return;
|
||||||
|
|
||||||
const want = compatible.find(e => e.id === preferred)?.id || compatible[0].id;
|
// Float the system-default engine (CFG_BACKUP_ENGINE) to the top and
|
||||||
select.innerHTML = compatible
|
// tag it "(default)" so it's the obvious pick for new locations.
|
||||||
.map(e => `<option value="${this.escape(e.id)}" ${e.id === want ? 'selected' : ''}>${this.escape(e.name || e.id)}</option>`)
|
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 `<option value="${this.escape(e.id)}" ${e.id === want ? 'selected' : ''}>${this.escape(label)}</option>`;
|
||||||
|
})
|
||||||
.join('');
|
.join('');
|
||||||
select.value = want;
|
select.value = want;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -257,7 +257,7 @@ class ConfigOptions {
|
|||||||
{ value: 'custom', label: 'Custom path' }
|
{ value: 'custom', label: 'Custom path' }
|
||||||
],
|
],
|
||||||
ENGINE: [
|
ENGINE: [
|
||||||
{ value: 'restic', label: 'restic' },
|
{ value: 'restic', label: 'Restic' },
|
||||||
{ value: 'borg', label: 'BorgBackup' },
|
{ value: 'borg', label: 'BorgBackup' },
|
||||||
{ value: 'kopia', label: 'Kopia' }
|
{ value: 'kopia', label: 'Kopia' }
|
||||||
],
|
],
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"id": "restic",
|
"id": "restic",
|
||||||
"name": "restic",
|
"name": "Restic",
|
||||||
"tagline": "Modern encrypted backup with native deduplication.",
|
"tagline": "Modern encrypted backup with native deduplication.",
|
||||||
"logo": "/icons/config/backup.svg",
|
"logo": "/icons/config/backup.svg",
|
||||||
"supported_types": ["local", "sftp", "rest", "s3", "b2", "gs", "azure", "rclone"],
|
"supported_types": ["local", "sftp", "rest", "s3", "b2", "gs", "azure", "rclone"],
|
||||||
|
|||||||
@ -32,7 +32,7 @@ locationAdd()
|
|||||||
echo "# Edit via the Locations page on /backup, or directly here."
|
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}_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}_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}_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}_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/<id>)|custom:Custom path]"
|
echo "CFG_BACKUP_LOC_${idx}_PATH_MODE=${default_path_mode} # Path Mode - Where this location stores its data [auto:Automatic (/docker/backups/<id>)|custom:Custom path]"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user