Admin Guide
Day-to-day operations: user management, access control, backup and restore, WAL management, and monitoring with the built-in admin portal and CLI.
CLI Reference — maree-db-cli
The maree-db-cli command-line tool is the primary administrative interface. It connects to the running server via the MySQL or REST wire protocol.
| Command | Description |
|---|---|
maree-db-cli | Launch the interactive SQL shell (connects to localhost:3306 by default). |
maree-db-cli status | Show server status: uptime, connections, port bindings, TamperLock state, health. |
maree-db-cli verify | Run the 5,574-check self-verification suite. Exits 0 on pass, non-zero on failure. |
maree-db-cli users list | List all database users and their roles. |
maree-db-cli users create | Create a new user with password and initial role assignments. |
maree-db-cli users delete <name> | Delete a user. All sessions for that user are immediately terminated. |
maree-db-cli backup <path> | Create a consistent online backup to the specified path. |
maree-db-cli restore <path> | Restore from a backup. Server must be stopped first. |
maree-db-cli wal status | Show WAL size, current LSN, checkpoint LSN, and replication lag. |
maree-db-cli wal checkpoint | Force an immediate WAL checkpoint. |
maree-db-cli migrate --source <url> | Run the migration wizard from a source database URL. |
maree-db-cli keygen --type <type> | Generate a cryptographic key. Types: aes256, ed25519. |
maree-db-cli compat-report --source <url> | Generate a compatibility report for a source database before migration. |
--host, --port, --user, --password, and --tls flags to connect to a remote instance. Or set MAREEDB_HOST, MAREEDB_PORT, MAREEDB_USER, MAREEDB_PASSWORD environment variables.User Management
Maree-DB user management uses standard SQL CREATE USER, DROP USER, GRANT, and REVOKE statements compatible with both MySQL and PostgreSQL syntax.
Roles & RBAC
Maree-DB supports role-based access control with role inheritance, row-level security policies, and column masking. Built-in compliance roles are pre-configured:
| Built-in Role | Permissions |
|---|---|
dba | Full administrative access — all databases, all operations. |
readonly | SELECT only on all databases (no DDL, no DML). |
gdpr_admin | Execute mareedb_gdpr_erase() and mareedb_gdpr_report(). |
hipaa_admin | Execute mareedb_hipaa_access_report() and access PHI audit logs. |
pci_admin | Detokenise PANs. Access PCI audit logs. |
payment_processor | Tokenise PANs. Read masked PAN columns. |
auditor | Execute SOC 2 and ISO 27001 evidence functions. Read-only access to all audit data. |
privacy_officer | Execute Australian Privacy Act residency check. Access PII map. |
dpo | Full DPO access: PII map, GDPR reports, erasure, all compliance functions. |
Backup & Restore
Online backup (server running)
Restore
--replay-to-lsn <LSN> or --replay-to-time '2026-05-27 14:30:00'.WAL Management
The Write-Ahead Log (WAL) is the foundation of Maree-DB's crash recovery and replication. Normal operation requires minimal WAL management — Maree-DB auto-checkpoints and auto-archives WAL segments.
Monitoring
Prometheus metrics
Maree-DB exposes a Prometheus-compatible /metrics endpoint on port 9090 (configurable). Key metrics:
mareedb_connections_active— active client connections by protocolmareedb_queries_per_second— query throughputmareedb_query_latency_ms— latency histogram (p50, p95, p99)mareedb_buffer_pool_hit_ratio— cache efficiency (target: >95%)mareedb_wal_replication_lag_ms— replication lag per replicamareedb_tamperlock_chain_length— TamperLock chain block countmareedb_fortress_lock_events_total— security event counter