Downgrade, Rollback, and Session Logs

Version 1.6.9-option-2 | Updated: August 07, 2026

Downgrade, Rollback, and Session Logs

11. Downgrade / Rollback

Bootstrap Command Reference

# Show help
curl -fsSL https://hub.friendly-tech.com/bootstrap/install.sh | sudo bash -s -- --help

# Show available versions
curl -fsSL https://hub.friendly-tech.com/bootstrap/install.sh | sudo bash -s -- --version-list

Installing a Previous Version

To install a specific version, use the --branch parameter:

curl -fsSL https://hub.friendly-tech.com/bootstrap/install.sh | sudo bash -s -- stack --branch 1.6.6

⚠️ WARNING: When specifying --branch, you are installing a specific version instead of the latest stable release (main). Make sure this is intentional.

Before Downgrade

  1. Check current version:

cat /opt/grafana/VERSION
  1. List available versions:

curl -fsSL https://hub.friendly-tech.com/bootstrap/install.sh | sudo bash -s -- --version-list
  1. Backup data (recommended):

cd /opt/grafana/prometheus-grafana-stack
docker compose down
cp -r prometheus_data /backup/prometheus_data_$(date +%Y%m%d)
cp -r grafana_data /backup/grafana_data_$(date +%Y%m%d)

Important Notes

  • Data compatibility: Downgrading may cause issues if Prometheus or Grafana database schemas changed between versions

  • Dashboards: Custom dashboards created in newer version may not work in older version

  • Configuration: .env settings are preserved, but new options added in later versions will be ignored

Clean Downgrade (Full Reset)

If you experience issues after downgrade or need a guaranteed clean state, perform a full reset. This involves two parts:

  1. Stack cleanup (Prometheus/Grafana server) - removes metrics history, dashboards, alert states

  2. Exporters cleanup (target nodes: ACS, MySQL, etc.) - removes exporter containers


Part 1: Stack (Prometheus/Grafana Server)

Step 1: Stop all services

cd /opt/grafana/prometheus-grafana-stack
docker compose down

Step 2: Backup current data (optional)

mkdir -p /backup/grafana-$(date +%Y%m%d)
cp -r prometheus_data grafana_data alertmanager_data /backup/grafana-$(date +%Y%m%d)/
cp .env /backup/grafana-$(date +%Y%m%d)/

Step 3: Remove data directories

cd /opt/grafana/prometheus-grafana-stack
rm -rf prometheus_data grafana_data alertmanager_data

Step 4: Remove repository and reinstall

rm -rf /opt/grafana

# Install latest stable version
curl -fsSL https://hub.friendly-tech.com/bootstrap/install.sh | sudo bash -s -- stack

# Or install specific version (downgrade)
curl -fsSL https://hub.friendly-tech.com/bootstrap/install.sh | sudo bash -s -- stack --branch 1.6.6

Note: Without --branch, the latest stable version from main is installed. Use --branch X.Y.Z only when you need a specific older version.

What gets removed:

Data Location Effect

Prometheus metrics

prometheus_data/

All historical metrics lost

Grafana database

grafana_data/

Dashboards, users, API keys reset

Alertmanager state

alertmanager_data/

Silences, notification history reset

What is preserved:

Data Location Notes

Configuration

.env

Backed up in Step 2, restore manually if needed

Target definitions

targets/*.json

Recreated by bootstrap based on detected services


Part 2: Exporters (Target Nodes)

Run these steps on each monitored server (ACS, MySQL, etc.):

Step 1: Stop all exporter containers

cd /opt/grafana/exporters
for dir in */; do
  [ -f "$dir/docker-compose.yml" ] && docker compose -f "$dir/docker-compose.yml" down
done

Step 2: Remove exporters directory

rm -rf /opt/grafana/exporters

Step 3: Reinstall exporters

# Install latest stable version
curl -fsSL https://hub.friendly-tech.com/bootstrap/install.sh | sudo bash -s -- exporters

# Or install specific version (downgrade)
curl -fsSL https://hub.friendly-tech.com/bootstrap/install.sh | sudo bash -s -- exporters --branch 1.6.6

What gets removed on exporter nodes:

Component Location Effect

Base exporters (node, process, cAdvisor)

exporters/base/

System/container metrics collection stops

JMX exporters

exporters/jmx-wildfly/

Java/WildFly metrics collection stops

MySQL exporter

exporters/mysql/

Database metrics collection stops

Note: Exporter clean install does not affect historical data - metrics are stored on the Prometheus server, not on exporter nodes.

⚠️ WARNING: Clean downgrade erases all monitoring history. Use only when:

  • Standard downgrade causes errors

  • Grafana/Prometheus fails to start after version change

  • You need a guaranteed working state


Capturing a Bootstrap Run

bootstrap.sh does not write log files. Session logging existed briefly and was removed (fef34da) — no production installer writes logs to disk, so there is no .bootstrap-logs/ directory to collect.

To capture a run for support, pipe it through tee. Only stdout is redirected, so stdin stays a terminal and every interactive prompt still works:

bash /opt/grafana/misc/bootstrap.sh <args> 2>&1 \
  | tee /tmp/bootstrap-$(date +%Y%m%d-%H%M%S).log

For a snapshot of the host rather than of one run — Docker, containers, ports, firewall and Prometheus targets — use the built-in diagnostic:

sudo bash /opt/grafana/misc/diagnose.sh