Is your feature request related to a problem? Please describe.
The backups are good, but they persist forever. I don't think it's useful to have a backup of my tabs one year ago.
Describe the solution you'd like
'Rolling' backups i.e. only keep the past X days. Like rolling logfiles. Practcially: modify or provide an alternative generateBackupFileName function which creates a filename like stg-backup-${backupFileIndex}@drive4ik${BACKUP_FILE_EXT} where backupFileIndex increases each time a backup is made on a new day, then rolls over. Only caveat: I don't know if the API allows overwriting files.. If not, this obviously won't work.
Describe alternatives you've considered
Manually deleting files.
Additional context
See also #292
I just cleared maybe 750 mb of backups from over a year usage, i backup everyday. it would be useful to roll backups after i hit 30 days (last X days).
I don't think WebExtensions supports that kind of file manipulation, but I could be wrong. An alternative would be a script setup in a job scheduler (cron, task scheduler, etc.)
PowerShell Example
Get-ChildItem -Filter *.json | Where-Object -FilterScript {$_.LastwriteTime -lt ((Get-Date).AddDays(-30))} | Remove-Item
I don't think WebExtensions supports that kind of file manipulation, …
Probably true.
The backups can be managed externally. You may use already existing utilities to do that. As such, the issue can be closed as wontfix.
https://github.com/jtagcat/dotfiles/blob/main/scripts/stg/stg-versioning.sh throws the backups in to git. I dropped thumbnails and some others, but you may modify the del() section to suit your needs.
Wrote the thing mainly to have per-group diffs/timeline/history to detect tab rot. I have 1.3y of backups, 12G ref (~3.5k tabs), the result being around 120MiB.
Since most tabs are the same from the previous, the data is heavily compressible.
Most helpful comment
I don't think WebExtensions supports that kind of file manipulation, but I could be wrong. An alternative would be a script setup in a job scheduler (cron, task scheduler, etc.)
PowerShell Example
Get-ChildItem -Filter *.json | Where-Object -FilterScript {$_.LastwriteTime -lt ((Get-Date).AddDays(-30))} | Remove-Item