OpsVault

Quick Start

Create your first automated backup in under 5 minutes.

This guide walks you through setting up OpsVault from a fresh binary to a running scheduled backup.

Don't have OpsVault installed yet? Run the one-line installer first:

curl -fsSL https://get.opsvault.dev | sudo bash

The installer handles the binary, optional dependencies, and the service. Come back here to configure your first backup.

Create the config file

opsvault config init

This writes a fully commented template to /etc/opsvault/config.yaml.

Configure your databases

The easiest way is the interactive wizard — no YAML editing required:

opsvault config wizard

Use ↑ ↓ to navigate, Enter to select. Go to Databases → Add new database, fill in your host, user, database name, and password env var, then Save & Exit.

Prefer editing by hand? Open the file directly:

nano /etc/opsvault/config.yaml

At minimum, add a database block:

databases:
  - name: myapp
    type: postgres        # or: mysql
    host: 127.0.0.1
    port: 5432
    user: backup_user
    password_env: DB_PASS
    database: myapp_prod
    enabled: true

Set the password via environment variable so it is never stored in plain text:

echo 'export DB_PASS=yourpassword' >> /etc/environment
source /etc/environment

Validate the config

opsvault config validate

If there are errors, they will be listed clearly. Fix them before continuing.

Run a manual backup

opsvault backup run

A successful run looks like:

  ✓  myapp  (1.2s)
       /var/backups/opsvault/myapp_20240115_020000.sql.gz

List your backups:

opsvault backup list

Install as a systemd service

opsvault service install
systemctl start opsvault
systemctl status opsvault

OpsVault will now run automatically on every server boot and back up your databases on the configured schedule (default: every night at 02:00).

Next steps

On this page