Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grafana Backup Tool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coopdevs
Migrated Projects
Tooling
Grafana Backup Tool
Commits
19754e95
Commit
19754e95
authored
4 years ago
by
Aaron Johnson
Browse files
Options
Downloads
Patches
Plain Diff
added no-archive feature
parent
1be39b41
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG.md
+2
-1
2 additions, 1 deletion
CHANGELOG.md
grafana_backup/cli.py
+2
-1
2 additions, 1 deletion
grafana_backup/cli.py
grafana_backup/save.py
+3
-1
3 additions, 1 deletion
grafana_backup/save.py
with
7 additions
and
3 deletions
CHANGELOG.md
+
2
−
1
View file @
19754e95
...
@@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file.
...
@@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file.
The format is based on
[
Keep a Changelog
](
https://keepachangelog.com/en/1.0.0/
)
,
The format is based on
[
Keep a Changelog
](
https://keepachangelog.com/en/1.0.0/
)
,
and this project adheres to
[
Semantic Versioning
](
https://semver.org/spec/v2.0.0.html
)
.
and this project adheres to
[
Semantic Versioning
](
https://semver.org/spec/v2.0.0.html
)
.
## [1.0.0] - 2020-07-
16
## [1.0.0] - 2020-07-
23
### Added
### Added
-
add setup.py
-
add setup.py
...
@@ -30,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
...
@@ -30,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
-
grafanaSettings can now be parameterized via an external json config file (~/.grafana-backup.json)
-
grafanaSettings can now be parameterized via an external json config file (~/.grafana-backup.json)
-
refactored backup/restore shell scripts
-
refactored backup/restore shell scripts
-
individual components can be backed up using console_script
-
individual components can be backed up using console_script
-
archiving of backup can now be skipped using --no-archive
### Removed
### Removed
-
delete Pipenv
-
delete Pipenv
...
...
This diff is collapsed.
Click to expand it.
grafana_backup/cli.py
+
2
−
1
View file @
19754e95
...
@@ -9,7 +9,7 @@ docstring = """
...
@@ -9,7 +9,7 @@ docstring = """
{0} {1}
{0} {1}
Usage:
Usage:
grafana-backup save [--config=<filename>] [--components=<folders,dashboards,datasources,alert-channels>]
grafana-backup save [--config=<filename>] [--components=<folders,dashboards,datasources,alert-channels>]
[--no-archive]
grafana-backup restore <archive_file> [--config=<filename>]
grafana-backup restore <archive_file> [--config=<filename>]
grafana-backup [--config=<filename>]
grafana-backup [--config=<filename>]
grafana-backup -h | --help
grafana-backup -h | --help
...
@@ -21,6 +21,7 @@ Options:
...
@@ -21,6 +21,7 @@ Options:
--config=<filename> Override default configuration path
--config=<filename> Override default configuration path
--components=<folders,dashboards,datasources,alert-channels> Comma separated list of individual components to backup
--components=<folders,dashboards,datasources,alert-channels> Comma separated list of individual components to backup
rather than backing up all components by default
rather than backing up all components by default
--no-archive Skip archive creation and do not delete unarchived files
"""
.
format
(
PKG_NAME
,
PKG_VERSION
)
"""
.
format
(
PKG_NAME
,
PKG_VERSION
)
args
=
docopt
(
docstring
,
version
=
'
{0} {1}
'
.
format
(
PKG_NAME
,
PKG_VERSION
))
args
=
docopt
(
docstring
,
version
=
'
{0} {1}
'
.
format
(
PKG_NAME
,
PKG_VERSION
))
...
...
This diff is collapsed.
Click to expand it.
grafana_backup/save.py
+
3
−
1
View file @
19754e95
...
@@ -7,6 +7,7 @@ from grafana_backup.archive import main as archive
...
@@ -7,6 +7,7 @@ from grafana_backup.archive import main as archive
def
main
(
args
,
settings
):
def
main
(
args
,
settings
):
arg_components
=
args
.
get
(
'
--components
'
,
False
)
arg_components
=
args
.
get
(
'
--components
'
,
False
)
arg_no_archive
=
args
.
get
(
'
--no-archive
'
,
False
)
backup_functions
=
{
'
dashboards
'
:
save_dashboards
,
backup_functions
=
{
'
dashboards
'
:
save_dashboards
,
'
datasources
'
:
save_datasources
,
'
datasources
'
:
save_datasources
,
...
@@ -23,4 +24,5 @@ def main(args, settings):
...
@@ -23,4 +24,5 @@ def main(args, settings):
for
backup_function
in
backup_functions
.
keys
():
for
backup_function
in
backup_functions
.
keys
():
backup_functions
[
backup_function
](
args
,
settings
)
backup_functions
[
backup_function
](
args
,
settings
)
archive
(
args
,
settings
)
if
not
arg_no_archive
:
archive
(
args
,
settings
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment