CLI commands
Reference for every command, subcommand and flag of the supermetry binary, used to serve the app and run install and maintenance tasks.
Use the supermetry binary to serve the app and run installation or maintenance tasks.
-
Confirm the installed version and list the top-level commands.
Terminal window supermetry versionsupermetry --help -
Choose the command you need. Commands without listed flags accept none.
Command Purpose and flags supermetryStart the server. supermetry serveis the explicit equivalent.supermetry installConfigure an install. Flags: --mode,--base-url,--database-url,--db-host,--db-port,--db-user,--db-password,--db-name,--db-sslmode,--listen,--proxy,--image,--dir,--yes,--dry-run,--version,--apply.supermetry backupCreate a database archive. Flag: --out FILE; default is a timestamped.tar.gzname.supermetry restore FILE --yesReplace the configured database from an archive. --yesis required.supermetry migrateApply pending database migrations. supermetry user createCreate a user and organization. Required flags: --email,--org.supermetry user reset-passwordStart a password reset. Required flag: --email.supermetry user make-adminGrant instance-admin access. Required flag: --email.supermetry user remove-adminRemove instance-admin access. Required flag: --email; the last instance admin cannot be removed.supermetry geoip updateDownload the configured MaxMind editions. No flags. supermetry recompute-rollupsRebuild all closed-day rollups. No flags. supermetry migrate-labelsRe-encrypt pre-rename stored secrets and rewrite path-policy IDs. No flags. supermetry close-daysClose an inclusive range of site-local days. Required flags: --site,--from,--to; dates useYYYY-MM-DD.supermetry loadRead ordered NDJSON events from standard input. No flags; requires SUPERMETRY_SITES_FILE.supermetry versionPrint the binary version. No flags. -
Run a command. For example, create a backup in the current directory.
Terminal window supermetry backup --out supermetry-backup.tar.gzsupermetry install --helplists every install flag with examples.--dry-runprints the complete plan without changing anything or connecting to the database, and--applyis internal (it runs a prepared privileged plan). Preview an install like this:Terminal window supermetry install --dry-run --mode docker --base-url https://analytics.supermetry.com
What you should see: the command prints its result and exits with status 0; the backup example prints Backup written to supermetry-backup.tar.gz.