Date in backup name #27

Closed
opened 2018-01-05 05:34:04 +00:00 by import_bot · 3 comments
Collaborator

Hi,
I saw that borgmatic dont use borg syntax to use prune prefix.
With borg bash script i use :
$REPOSITORY::'{hostname}-{now:%Y-%m-%d}'
borg prune -v $REPOSITORY --prefix '{hostname}-' --keep-daily=7

But with borgmatic :
repository: root@neon:/mnt/backups:sourcehostname
keep_daily: 7
prefix: sourcehostname

How to add date to the backup name, as i did with borg bash script ?
Thx a lot


Imported from Taiga issue 26 (done). Created on 2016-10-13T09:41:13+0000 by eolien.

Hi, I saw that borgmatic dont use borg syntax to use prune prefix. With borg bash script i use : $REPOSITORY::'{hostname}-{now:%Y-%m-%d}' borg prune -v $REPOSITORY --prefix '{hostname}-' --keep-daily=7 But with borgmatic : repository: root@neon:/mnt/backups:sourcehostname keep_daily: 7 prefix: sourcehostname How to add date to the backup name, as i did with borg bash script ? Thx a lot --- Imported from Taiga issue 26 (done). Created on 2016-10-13T09:41:13+0000 by eolien.
import_bot added the
question / support
label 2018-01-05 05:34:04 +00:00
Author
Collaborator

When creating a backup, borgmatic gives the archive a name with the following format:

hostname-timestamp

Here's an example archive name: "flux-2017-07-01T17:29:07.008703"

So you can use the borgmatic "prefix" option to change how pruning works by simply giving a string that will be matches against the archive name. But you can't currently alter the created archive name. Is that what you're interesting in doing? Or does the default datetime format work for your needs?


Comment on 2017-07-23T04:56:29+0000 by Dan Helfman.

When creating a backup, borgmatic gives the archive a name with the following format: `hostname`-`timestamp` Here's an example archive name: "flux-2017-07-01T17:29:07.008703" So you can use the borgmatic "prefix" option to change how pruning works by simply giving a string that will be matches against the archive name. But you can't currently alter the created archive name. Is that what you're interesting in doing? Or does the default datetime format work for your needs? --- Comment on 2017-07-23T04:56:29+0000 by Dan Helfman.
Author
Collaborator

Also note this issue, which may be related or a duplicate: https://tree.taiga.io/project/witten-borgmatic/issue/28


Comment on 2017-07-23T04:58:00+0000 by Dan Helfman.

Also note this issue, which may be related or a duplicate: https://tree.taiga.io/project/witten-borgmatic/issue/28 --- Comment on 2017-07-23T04:58:00+0000 by Dan Helfman.
Author
Collaborator

You can now use whatever Borg datetime format you like. As of borgmatic 1.1.7, you can add an "archive_name_format" to the "storage" section containing the exact format and prefix you want using these placeholders: borgbackup.readthedocs.io/en/stable/usage.html#borg-help-placeholders

Please let me know if that doesn't solve your issue.


Comment on 2017-09-09T04:14:38+0000 by Dan Helfman.

You can now use whatever Borg datetime format you like. As of borgmatic 1.1.7, you can add an "archive_name_format" to the "storage" section containing the exact format and prefix you want using these placeholders: borgbackup.readthedocs.io/en/stable/usage.html#borg-help-placeholders Please let me know if that doesn't solve your issue. --- Comment on 2017-09-09T04:14:38+0000 by Dan Helfman.
Sign in to join this conversation.
No Milestone
No Assignees
1 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#27
No description provided.