added keep_hourly

This commit is contained in:
Philipp
2026-05-21 09:17:51 +02:00
parent 4af9f32c46
commit 15c4dd9a8b
7 changed files with 87 additions and 14 deletions
+3
View File
@@ -25,6 +25,7 @@ export const config = {
RESTIC_PASSWORD: process.env.RESTIC_PASSWORD || '',
},
retention: {
keepHourly: Number(process.env.RESTIC_KEEP_HOURLY || 0),
keepDaily: Number(process.env.RESTIC_KEEP_DAILY || 7),
keepWeekly: Number(process.env.RESTIC_KEEP_WEEKLY || 0),
keepMonthly: Number(process.env.RESTIC_KEEP_MONTHLY || 0),
@@ -37,6 +38,7 @@ export const editableEnv = [
{ key: 'RESTIC_REPOSITORY', label: 'Restic repository', required: true, secret: false },
{ key: 'RESTIC_PASSWORD', label: 'Restic password', required: true, secret: true },
{ key: 'ZFS_POOL_NAME', label: 'ZFS pool name', required: true, secret: false },
{ key: 'RESTIC_KEEP_HOURLY', label: 'Keep hourly snapshots', required: false, secret: false },
{ key: 'RESTIC_KEEP_DAILY', label: 'Keep daily snapshots', required: false, secret: false },
{ key: 'RESTIC_KEEP_WEEKLY', label: 'Keep weekly snapshots', required: false, secret: false },
{ key: 'RESTIC_KEEP_MONTHLY', label: 'Keep monthly snapshots', required: false, secret: false },
@@ -111,6 +113,7 @@ function applyRuntimeEnv(values) {
config.resticEnv.AWS_SECRET_ACCESS_KEY = process.env.AWS_SECRET_ACCESS_KEY || '';
config.resticEnv.RESTIC_REPOSITORY = process.env.RESTIC_REPOSITORY || '';
config.resticEnv.RESTIC_PASSWORD = process.env.RESTIC_PASSWORD || '';
config.retention.keepHourly = Number(process.env.RESTIC_KEEP_HOURLY || 0);
config.retention.keepDaily = Number(process.env.RESTIC_KEEP_DAILY || 7);
config.retention.keepWeekly = Number(process.env.RESTIC_KEEP_WEEKLY || 0);
config.retention.keepMonthly = Number(process.env.RESTIC_KEEP_MONTHLY || 0);