Documentation

Everything you need to set up and run IncreVault.

Installation

Install IncreVault with a single command. It pulls the latest binary and places it in your PATH.

bash
curl -sSL increvault.com | sh

Supports Linux (x86_64, arm64) and macOS. Requires curl and a POSIX shell.

Other install methods

--version Install a specific version: curl -sSL increvault.com | sh -s -- --version 1.2.3
manual Download from GitHub Releases and place in /usr/local/bin/

Quick Start

Get up and running in under a minute with --quickstart.

bash
# Install
curl -sSL increvault.com | sh

# Generate a working config with sensible defaults
increvault init --quickstart

# Run your first backup
increvault backup

# Check status
increvault status

What --quickstart does

Creates /etc/increvault/increvault.yaml
Generates a random encryption password at /etc/increvault/.repo-password
Initializes a local repository at /srv/backups/increvault
Backs up /home, /etc, and /var/www
Schedules daily backup (2 AM), weekly prune (Sunday 3 AM), monthly verify (1st at 4 AM)

For a guided interactive setup, run increvault init without flags.

Configuration

IncreVault is configured via YAML. Default location: /etc/increvault/increvault.yaml.

yaml
repository:
  type: local
  path: /srv/backups/increvault
  password_file: /etc/increvault/.repo-password

backup:
  include:
    - /home
    - /etc
    - /var/www
  exclude:
    - "*.tmp"
    - node_modules

retention:
  keep_last: 7
  keep_daily: 30
  keep_weekly: 12
  keep_monthly: 12

Key config options

repository.type local, s3, or sftp
repository.path Local path, S3 bucket, or SFTP path
backup.include Directories to include in backups
backup.exclude Glob patterns to exclude (e.g., node_modules, .cache)
retention How many daily/weekly/monthly snapshots to keep

S3 Storage

yaml
repository:
  type: s3
  path: my-backup-bucket/increvault
  password_file: /etc/increvault/.repo-password
  s3:
    access_key: AKIAIOSFODNN7EXAMPLE
    secret_key: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
    region: us-east-1

Also works with S3-compatible storage (MinIO, Wasabi, Backblaze B2) via endpoint_url.

SFTP Storage

yaml
repository:
  type: sftp
  path: /backups/increvault
  password_file: /etc/increvault/.repo-password
  sftp:
    host: backup-server.example.com
    user: backupuser
    key_file: /root/.ssh/id_ed25519

Database Hooks

IncreVault runs pre-backup hooks to dump your databases before snapshotting, ensuring consistent backups.

yaml
database:
  mysql:
    enabled: true
    credentials_file: /etc/increvault/.mysql-credentials
    dump_options: "--single-transaction --quick"
  postgres:
    enabled: true
    credentials_file: /etc/increvault/.pg-credentials
    dump_options: "--format=custom"

Credentials files must have 0600 permissions: chmod 0600 /etc/increvault/.mysql-credentials

Commands

Every command supports --dry-run, --json, --quiet, and --verbose flags.

Command Description
initInitialize IncreVault (interactive or --quickstart)
backupRun the backup pipeline
restoreRestore files (full, app, directory, or single file)
listList backup snapshots
statusShow backup system summary
pruneApply retention policy
verifyRun repository integrity checks
test-restoreTest-restore to a temp directory
configShow/validate config, manage schedule
appsManage registered applications
cloneClone server backup to a new machine via SSH
keyManage encryption keys (list, add, remove, rotate)
notifySend test/custom notifications
cleanupRemove stale temp files and dumps
unlockRemove stale repository locks
updateUpdate IncreVault (or rollback)
versionShow version and check for updates
uninstallRemove IncreVault from the system

backup

bash
# Standard backup
increvault backup

# Tag the snapshot
increvault backup --tag daily

# Back up a single app
increvault backup --app mysite

# Preview without executing
increvault backup --dry-run

restore

bash
# Full server restore
increvault restore --snapshot latest --confirm-full-restore

# Restore a single app with its database
increvault restore --snapshot latest --app mysite --include-db

# Restore a directory to a different location
increvault restore --snapshot abc123de --path /etc --target /tmp/restore

# Restore a single file
increvault restore --snapshot latest --file /etc/nginx/nginx.conf

apps

bash
# Auto-detect apps
increvault apps detect --path /var/www

# Register manually
increvault apps add --name blog --path /var/www/blog --type wordpress

# List registered apps
increvault apps list

Scheduling

Set up automated backups with systemd timers or cron jobs.

yaml
schedule:
  method: systemd-timer
  # Daily at 2 AM
  backup: "0 2 * * *"
  # Weekly on Sunday at 3 AM
  prune: "0 3 * * 0"
  # Monthly on the 1st at 4 AM
  verify: "0 4 1 * *"
bash
# Regenerate schedule from config
increvault config schedule

# Disable scheduled backups
increvault config schedule --disable

# Check if timers are active
systemctl list-timers | grep increvault

Notifications

Get alerted on backup success, failure, or warnings via webhook, email, or Slack.

yaml
notifications:
  on_success: false
  on_failure:
    - type: webhook
      url: https://hooks.example.com/backup
    - type: slack
      url: https://hooks.slack.com/services/T00/B00/XXX
    - type: email
      smtp_host: smtp.example.com
      smtp_port: 587
      from: alerts@example.com
      to:
        - admin@example.com
bash
# Test your notification config
increvault notify --test

Server Cloning

Migrate your entire server to a new machine. IncreVault connects via SSH, installs itself on the target, copies configuration, and restores the latest snapshot.

bash
# Clone to a new server
increvault clone --target 192.168.1.100

# Use a custom SSH key and user
increvault clone --target host --ssh-key ~/.ssh/id_ed25519 --ssh-user deploy

# Exclude specific apps from clone
increvault clone --target host --exclude-apps app1,app2

# Preview without executing
increvault clone --target host --dry-run

Post-clone health checks verify config, repository access, disk space, web servers, databases, and DNS.

Troubleshooting

Common issues and how to fix them.

"Repository is locked"

A crashed process left a lock. Check status, then remove stale locks:

increvault unlock --yes

"password_file must have 0600 permissions"

Credential files must only be readable by the owner:

chmod 0600 /etc/increvault/.repo-password

Backup seems slow

Run with verbose output and consider adding exclusions:

increvault backup --verbose --dry-run

Restore interrupted

Resume an interrupted restore:

increvault restore --resume

Schedule not running

Regenerate timers and check logs:

increvault config schedule
journalctl -u increvault-backup.service --since today

Stale temp files filling disk

Clean up stale staging dirs, dumps, and test-restore files:

increvault cleanup --dry-run