mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-19 22:46:20 -05:00
* The backup drive keeps deleted files for 30 days, then removes them The fifth part of replacing the sync. A backup drive never deleted anything, so it grew forever and kept every file the media directory had ever held. Now, like a secondary: - A file deleted from the media directory, or the old version of one that changed, is moved to a dated folder in .backup-trash on the backup drive. Folders older than backup_delete_after_days (sync.yaml; 30 by default, also for drives set up before this; none never deletes) are removed, before and after each backup, and the oldest go sooner when the drive is nearly full. - A backup refuses a media directory that is not mounted, or has no config/wrolpi.yaml: copied with deletes, an empty folder would move the whole backup drive to the trash. - The Backup Drive panel has the same "Delete after N days / Never delete them" control as the Sync panel, now one component, and refuses an empty number of days. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * A nearly full drive keeps the trash it just filled, and makes room for the database Review found, in the backup drive's trash and in the secondary's sync, which share its shape: - Below 1 GiB free, the purge after a copy removed the newest trash folder too. Moving a file to the trash is a rename, which frees nothing, so on a nearly full drive a deleted file was gone at the end of the same run instead of 30 days later. The newest folder is now only removed by age (0 days still deletes at once). - The purge made room only down to 1 GiB, so a database larger than the free space failed to be copied every time while the trash was full. Before the database is written (the backup's snapshot, the secondary's copy of its primary's), the trash now makes room for the whole database. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| api | ||
| lib | ||
| templates | ||
| test | ||
| __init__.py | ||
| conftest.py | ||
| defaults.py | ||
| main.py | ||
| requirements.lock | ||
| requirements.txt | ||
| rsyncd.conf | ||
| serve.py | ||