How to keep two backups for end of month and first day of a month [Support] #1306

Open
opened 2026-05-07 08:11:52 +00:00 by elhananjair · 1 comment

What I'm trying to do and why

Hello, I wanted to keep backups that were taken on the first and last days of each month. For the time being, I was able to keep the last day of the month using keep_monthly=-1, but I'm not sure how to add the first day of the month as well.

Steps to reproduce

No response

Actual behavior

No response

Expected behavior

No response

Other notes / implementation ideas

No response

borgmatic version

2.1.5

borgmatic installation method

package

Borg version

borg 1.4.2

Python version

Python 3.13.13

Database version (if applicable)

No response

Operating system and version

Fedora Linux 43 (WSL) x86_64

### What I'm trying to do and why Hello, I wanted to keep backups that were taken on the first and last days of each month. For the time being, I was able to keep the last day of the month using `keep_monthly=-1`, but I'm not sure how to add the first day of the month as well. ### Steps to reproduce _No response_ ### Actual behavior _No response_ ### Expected behavior _No response_ ### Other notes / implementation ideas _No response_ ### borgmatic version 2.1.5 ### borgmatic installation method package ### Borg version borg 1.4.2 ### Python version Python 3.13.13 ### Database version (if applicable) _No response_ ### Operating system and version Fedora Linux 43 (WSL) x86_64
Owner

Unfortunately I don't think that's currently possible using borgmatic's keep_* options, which are built atop Borg prune --keep-* flags. If you need a really custom pruning strategy like this, you could try disabling automatic pruning entirely and then use borgmatic delete to delete archives that you don't want to keep. In that scenario though, you'd be responsible for determining those archives yourself.

Unfortunately I don't think that's currently possible using borgmatic's `keep_*` options, which are built atop [Borg `prune --keep-*` flags](https://borgbackup.readthedocs.io/en/stable/usage/prune.html). If you need a really custom pruning strategy like this, you could try disabling automatic pruning entirely and then use `borgmatic delete` to delete archives that you don't want to keep. In that scenario though, you'd be responsible for determining those archives yourself.
Sign in to join this conversation.
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
borgmatic-collective/borgmatic#1306
No description provided.