grafana-backup-tool icon indicating copy to clipboard operation
grafana-backup-tool copied to clipboard

Non timestamped backups

Open dfluff opened this issue 4 years ago • 2 comments

This adds the ability to not tar the backup and to not name the directories or log files with a timestamp.

If the backup directories are being checked in to a version control repository you want each backup to produce files and directories with the same names. The default behaviour continues to be the safest, which timestamps and archives each new backup.

dfluff avatar Sep 04 '20 13:09 dfluff

@dfluff I'm guessing the reason this hasn't gotten any traction is because your PR seems very use case specific and is subjective in its reasoning. Is this something we want to consider @ysde? I will say having the ability to set the archive name from the CLI, something like -o, --output grafana-backup archive output filename would be nice.

acjohnson avatar Jun 14 '21 19:06 acjohnson

I find it useful, precisely to track a backup under a version control repository. The default config is the same (with "archive": true, "timestamp_backups": true), although the case I'm interested is "archive": false, "timestamp_backups": false. That's the reason why I forked @dfluff's version.

jartigag avatar Jun 24 '21 10:06 jartigag

Hi,

the pull request is a bit older now, but would fit perfectly in our scenario as well. Is there still a change that it is merged after almost two years?

Coster avatar May 25 '23 14:05 Coster

@Coster

Sorry for breaking into the year long discussion :) , but I was wondering about the same issue today.

It seems possible to specify "backup_file_format": "dump" or any other constant name => then your backups won't be timed.

I also try to expose this variable to be configurable from the env here: https://github.com/ysde/grafana-backup-tool/pull/223

As for the archive issue, there is a flag now: https://github.com/ysde/grafana-backup-tool/blob/3dd9d71a48a58484ac4b60cdebb5eb1235e95246/grafana_backup/save.py#L25

so it looks like the functionality in this pr is already available in master

vindex10 avatar Jun 19 '23 09:06 vindex10

Solved in https://github.com/ysde/grafana-backup-tool/pull/223

acjohnson avatar Jul 19 '23 05:07 acjohnson