OpsVault

config

Manage the OpsVault configuration file.

config init

Write a default, fully commented config file to disk.

opsvault config init [flags]

By default, writes to the path specified by --config (default: /etc/opsvault/config.yaml).

# Write to default location
opsvault config init

# Write to a custom path
opsvault config init --config /home/user/opsvault.yaml

# Overwrite an existing file
opsvault config init --force

Flags

FlagDefaultDescription
--forcefalseOverwrite an existing config file

config validate

Parse and validate the config file. Prints a summary on success, or a list of errors on failure.

opsvault config validate [flags]

Success output

  ✓  Config valid  /etc/opsvault/config.yaml

    databases       2
    schedule        0 2 * * *
    backup dir      /var/backups/opsvault
    rclone          enabled
    telegram        enabled
    email           disabled

Error output

  ✗  Config invalid (2 error(s))

    • databases[0].password: password or password_env required
    • storage.rclone.remote: required when rclone is enabled

What is validated

  • At least one database is configured
  • Each database has type, user, database, and either password or password_env
  • Database type is mysql or postgres
  • If rclone is enabled, remote is set
  • If Telegram is enabled, bot_token (or bot_token_env) and chat_id are set
  • If email is enabled, smtp_host, from, and to are set
  • The schedule is a valid 5-field cron expression

Always run config validate after editing the config file, before restarting the service.


config wizard

Launch an interactive terminal wizard to create or edit your config file — no manual YAML editing required.

opsvault config wizard [flags]

The wizard opens a full-screen TUI menu. Use ↑ ↓ arrows to navigate and Enter to select.

SectionWhat you can configure
General SettingsBackup directory, cron schedule, log level, log format
DatabasesAdd, edit, or remove MySQL / PostgreSQL database entries
Storagerclone remote name, path template, upload options
RetentionHow many backups to keep locally and on the remote
NotificationsTelegram bot and SMTP email settings
Save & ExitWrite changes to the config file
Exit without savingDiscard all changes

Example session

# Edit the default config
opsvault config wizard

# Edit a config at a custom path
opsvault config wizard --config /home/user/opsvault.yaml

After saving, run opsvault config validate to confirm the file is correct, then opsvault reload to apply changes to the running service.

Passwords are never stored in the wizard. Use password env var fields (e.g. DB_PASS) — the wizard only stores the env var name, not the value.

On this page