[release-12.1.3] Fix grafanactl resource pull command syntax (#111607)

Co-authored-by: Irene Rodríguez <irene.rodriguez@grafana.com>
Fix grafanactl resource pull command syntax (#111465)
This commit is contained in:
grafana-delivery-bot[bot]
2025-09-25 13:03:39 +00:00
committed by GitHub
parent 2c55900b9c
commit e429aea3b6
@@ -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