ifgris / obsidian-local-backup

Automatically creates a local backup of the vault.
MIT License
61 stars 5 forks source link

Backup retain policy #47

Open s-celles opened 1 month ago

s-celles commented 1 month ago

Hello,

First thanks for this nice plugin. I'd like to propose a feature for a better backup retain policy.

Currently this plugin have 2 important settings to define backup retain policy:

Some softwares have a "better" backup retain policy which is the following Let's take as an example PBS (Proxmox Backup System) which aim at backup Proxmox VE virtual machines and/or LXC containers https://pbs.proxmox.com/docs/maintenance.html

keep-last <N>
Keep the last <N> backup snapshots.

keep-hourly <N>
Keep backups for the last <N> hours. If there is more than one backup for a single hour, only the latest is retained. Hours without backups do not count.

keep-daily <N>
Keep backups for the last <N> days. If there is more than one backup for a single day, only the latest is retained. Days without backups do not count.

keep-weekly <N>
Keep backups for the last <N> weeks. If there is more than one backup for a single week, only the latest is retained. Weeks without backup do not count.

Note
Weeks start on Monday and end on Sunday. The software uses the [ISO week date](https://en.wikipedia.org/wiki/ISO_week_date) system and handles weeks at the end of the year correctly.

keep-monthly <N>
Keep backups for the last <N> months. If there is more than one backup for a single month, only the latest is retained. Months without backups do not count.

keep-yearly <N>
Keep backups for the last <N> years. If there is more than one backup for a single year, only the latest is retained. Years without backups do not count.

What is your opinion about such a backup retain policy?

Kind regards

ifgris commented 1 month ago

Hello, thanks for your advice, I'm considering add these features after fixing bugs.