grafana-util docs

grafana-util-dashboard-history.1

Browser-readable rendering of a generated roff manpage.

This page renders the generated roff manpage into readable HTML for browser use. For richer per-subcommand detail, prefer the command-reference pages.

NAME

grafana-util-dashboard-history - List, restore, diff, or export dashboard revision history for one dashboard UID, whether it comes from live Grafana or from local history artifacts.

SYNOPSIS

grafana-util dashboard history [OPTIONS]

DESCRIPTION

List, restore, diff, or export dashboard revision history for one dashboard UID, whether it comes from live Grafana or from local history artifacts.

Use this when you need to inspect earlier dashboard versions, recover a known-good revision, or export dashboard history into a reusable artifact for review or CI. You can also read the same history back from a single exported artifact or an export tree with included history.

BEFORE / AFTER

  • Before: dashboard revision recovery often meant guessing which old version to trust, then manually rebuilding it or editing JSON by hand.
  • After: one history namespace covers list, restore, diff, and export, so operators can inspect old versions, compare revisions from different dates, recover a known-good revision, and hand the same artifact to review or CI.

COMMON OPTIONS

--dashboard-uid
the dashboard UID whose revision history you want. Required for live history list and restore, and useful for filtering local export-tree history.
--input
read one reusable history artifact produced by dashboard history export.
--input-dir
read one export tree produced by dashboard export --include-history.
--base-dashboard-uid / --new-dashboard-uid
dashboard UIDs for live or export-tree diff sources.
--base-input / --new-input
reusable history artifacts to compare.
--base-input-dir / --new-input-dir
export trees to compare, which lets you compare history exports from different dates.
--base-version / --new-version
the historical version numbers to compare.
--limit
how many recent versions to include in list or export views.
--version
the historical version number to restore.
--message
revision message for the new restored revision.
--dry-run
preview a restore without changing Grafana.
--yes
confirm a real restore.
--output-format
render list or restore output as text, table, json, or yaml. Diff uses text or json.
--output
write exported history artifacts to a JSON file.
--overwrite
replace an existing export artifact.

SUCCESS CRITERIA

  • list output shows the revision numbers and messages you expected for the target dashboard UID
  • restore dry-run clearly shows the version that would become the new latest revision
  • diff clearly shows the two versions you compared and whether they matched
  • a real restore leaves the old version in history and adds a new current revision
  • export writes a reusable JSON artifact that can be inspected later without Grafana

FAILURE CHECKS

  • if list output is empty, confirm the dashboard UID and whether your credentials can see that dashboard
  • if restore fails, verify that the target version exists and that you supplied --yes for a live restore
  • if export writes the wrong file or seems stale, confirm the output path and whether --overwrite was intended

EXAMPLES

List, restore, diff, or export dashboard revision history for one dashboard UID, whether it comes from live Grafana or from local history artifacts.

grafana-util dashboard history list --url http://localhost:3000 --basic-user admin --basic-password admin --dashboard-uid cpu-main --limit 20 --output-format table

SEE ALSO

grafana-util(1)