meza
meza copied to clipboard
Create method to keep `m_backups` clean
Create method to keep directory clean like:
- Only keep one backup from the last day (the newest?)
- Only keep one backup between yesterday and a week ago (the oldest?)
- Only keep one backup between a week ago and a month ago (the oldest?)
- Only keep one backup between a month ago and two months ago (the oldest?)
- ...and so on...
What about:
- Keep latest backup
.sql
file - Compress all previous:
- Keep first backup
.sql
file - Create incremental backups (diffs against first) of all subsequent
- gzip first + incrementals into a
<wiki_id>_backup_YMDHis_to_YMDHis.tar.gz
- Keep first backup