BackupScheduler Enhancement:
- Added incremental: bool field to BackupScheduleConfig
- Default: incremental=true (enabled by default)
- copy_incremental_to_snapshot() method
- file_changed() detection (size + mtime comparison)
- Hardlink unchanged files to base snapshot (ZFS-style)
Incremental Backup Algorithm:
1. If incremental=true and previous snapshot exists:
- Compare file size and mtime with base snapshot
- If unchanged: create hardlink to base (zero disk usage)
- If changed: copy and compress (new content)
2. If incremental=false or no previous snapshot:
- Full copy (traditional backup)
Storage Savings:
- Unchanged files: hardlink (0 extra disk space)
- Changed files: copy + compress (minimal overhead)
- Similar to ZFS snapshot mechanism
BackupConfigResponse Updated:
- Added incremental field
- Added compress field (GUI: dropdown select)
Backup.vue Updated:
- Incremental switch with explanation text
- Compression dropdown (None/LZ4/ZSTD)
- Default values loaded from backend
REST API Test:
curl /api/v2/backup/config
{incremental:true,compress:zstd,...}
Build: 495 tests pass
80 KiB
80 KiB