From e429aea3b69a72e07590ce93a9dfc43b09010691 Mon Sep 17 00:00:00 2001 From: "grafana-delivery-bot[bot]" <132647405+grafana-delivery-bot[bot]@users.noreply.github.com> Date: Thu, 25 Sep 2025 13:03:39 +0000 Subject: [PATCH] [release-12.1.3] Fix grafanactl resource pull command syntax (#111607) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Irene Rodríguez Fix grafanactl resource pull command syntax (#111465) --- .../grafana-cli/grafanacli-workflows.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/sources/observability-as-code/grafana-cli/grafanacli-workflows.md b/docs/sources/observability-as-code/grafana-cli/grafanacli-workflows.md index b510dd2e64c..b8128d211cd 100644 --- a/docs/sources/observability-as-code/grafana-cli/grafanacli-workflows.md +++ b/docs/sources/observability-as-code/grafana-cli/grafanacli-workflows.md @@ -37,7 +37,7 @@ Use these steps to migrate resources between environments: {{< admonition type="note" >}} Resources are pulled and pushed from the `./resources` directory by default. -This directory can be configured with the `--directory`/`-d` flags. +This can be configured with the `-p, --path` flags to specify custom paths on disk. {{< /admonition >}} 1. Make changes to dashboards and other resources using the Grafana UI in your **development instance**. @@ -45,21 +45,21 @@ This directory can be configured with the `--directory`/`-d` flags. ```bash grafanactl config use-context YOUR_CONTEXT # for example "dev" - grafanactl resources pull -d ./resources/ -o yaml # or json + grafanactl resources pull --path ./resources/ -o yaml # or json ``` 1. (Optional) Preview the resources locally before pushing: ```bash grafanactl config use-context YOUR_CONTEXT # for example "prod" - grafanactl resources serve -d ./resources/ + grafanactl resources serve ./resources/ ``` 1. Switch to the **production instance** and push the resources: ```bash grafanactl config use-context YOUR_CONTEXT # for example "prod" - grafanactl resources push -d ./resources/ + grafanactl resources push -p ./resources/ ``` ## Back up Grafana resources @@ -70,7 +70,7 @@ This workflow helps you back up all Grafana resources from one instance and late ```bash grafanactl config use-context YOUR_CONTEXT # for example "prod" - grafanactl resources pull -d ./resources/ -o yaml # or json + grafanactl resources pull --path ./resources/ -o yaml # or json ``` 1. Save the exported resources to version control or cloud storage. @@ -81,14 +81,14 @@ This workflow helps you back up all Grafana resources from one instance and late ```bash grafanactl config use-context YOUR_CONTEXT # for example "prod" - grafanactl resources serve -d ./resources/ + grafanactl resources serve ./resources/ ``` 1. To restore the resources later or restore them on another instance, push the saved resources: ```bash grafanactl config use-context YOUR_CONTEXT # for example "prod" - grafanactl resources push -d ./resources/ + grafanactl resources push -p ./resources/ ``` ## Manage dashboards as code @@ -114,7 +114,7 @@ With this workflow, you can define and manage dashboards as code, saving them to ```bash grafanactl config use-context YOUR_CONTEXT # for example "dev" - grafanactl resources push -d ./resources/ + grafanactl resources push -p ./resources/ ``` ## Explore and modify resources from the terminal @@ -197,7 +197,7 @@ Use this workflow to locate dashboards using a deprecated API version and mark t playlist.grafana.app v1 playlist ``` -1. Find dashboards that are still using an old API version: +1. Find dashboards that are still using a deprecated API version: ```bash grafanactl resources get dashboards.v1.dashboard.grafana.app