Docs / Admin Guide

Admin Guide

This guide covers day-to-day administration of Maree-DB: the admin portal, CLI commands, user management, and backup/restore.

Admin Portal

The admin portal is accessible via the REST API port (default 8080) at http://localhost:8080/admin. It provides a web UI for:

  • Monitoring connections, query throughput, and resource usage
  • Managing users and roles
  • Viewing and managing databases and tables
  • Running queries in the built-in SQL editor
  • Reviewing health check results
  • Managing backups
  • Cluster management (Enterprise tier)

CLI Reference

CommandDescription
maree-db-serverStart the server (foreground). Use sudo systemctl start maree-db for a managed service.
sudo systemctl stop maree-dbGracefully stop the server (systemd).
sudo systemctl restart maree-dbRestart the server (systemd).
sudo systemctl status maree-dbShow service status.
maree-db-server verify --allRun self-verification benchmarks.
maree-db health-checkRun the health check manually.
maree-db backup now --target localTake a managed backup (Professional+).
maree-db backup restore --source <path>Restore from a managed backup (Professional+).
maree-db users create <user> --role <role>Create a new database user.
maree-db users listList all users.
maree-db users delete <user>Delete a user.
maree-db users grant <user> <permission> ON <target>Grant a permission to a user.
maree-db users revoke <user> <permission> ON <target>Revoke a permission from a user.
maree-db licence activateActivate a licence key.
maree-db licence statusShow current licence details.
maree-db licence hardware-idPrint the Hardware ID for offline activation.
maree-db migrate map-typeConvert a source column type to Maree-DB.

User Management

# Create a new user (the CLI prompts for the password) maree-db users create appuser --role read_write # Or via SQL: CREATE USER appuser WITH PASSWORD 'secure_password'; GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA public TO appuser; # Create a read-only user CREATE USER readonly WITH PASSWORD 'secure_password'; GRANT SELECT ON ALL TABLES IN SCHEMA public TO readonly; # List all users (via the CLI) maree-db users list

Backup and Restore

# Managed backup - Professional+ (run against a live server) maree-db backup now --target local # List available backups maree-db backup list # Restore from a managed backup maree-db backup restore --source /var/lib/maree-db/backups/bk-001 # Every tier: portable SQL dump over the wire (works today) pg_dump -h localhost -p 5432 -U root myapp > myapp-$(date +%Y%m%d).sql # Scheduled backups + point-in-time recovery are on the Professional+ # roadmap - see the Backup & Restore guide for what is available today.

Monitoring

# Prometheus-compatible metrics (connections, query latency, throughput) curl http://localhost:8080/metrics # Run the self-verification + health checks from SQL (real functions) SELECT * FROM VERIFY(); SELECT * FROM HEALTH_CHECK(); # Verify / health-check history (real system tables) SELECT * FROM _system.verify_history; SELECT * FROM _system.health_check_history; # Live status is also on the web admin console at /ui