grafana-backup-tool
grafana-backup-tool copied to clipboard
Non timestamped backups
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 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.
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.
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
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
Solved in https://github.com/ysde/grafana-backup-tool/pull/223