🎁 Get the FREE AI Skills Starter GuideSubscribe →
BytesAgainBytesAgain
🦀 ClawHub

VPS Backup

by @codaire

Automated daily VPS backup using restic — backs up OpenClaw workspace, SSH keys, project code, and session transcripts. Configures encrypted incremental snap...

Versionv1.0.0
⚙️ Configuration

1. Install restic

# Linux (others: https://restic.net/install/)
curl -LO https://github.com/restic/restic/releases/latest/download/restic_linux_amd64.tar.gz
tar xzf restic_linux_amd64.tar.gz
sudo mv restic /usr/local/bin/
restic version

2. Install rclone (for offsite push — optional)

curl -LO https://downloads.rclone.org/rclone-current-linux-amd64.zip
unzip rclone-current-linux-amd64.zip
sudo cp rclone-linux-amd64/rclone /usr/local/bin/
rclone version

3. Configure the script

Edit the top config section of scripts/vps-backup.sh:

BACKUP_ROOT="/home/dev/backup/vps-daily"    # local backup root
BACKUP_PATHS=(                                    # what to back up
    "/home/dev/.openclaw"
    "/home/dev/.config/opencode"
    "/home/dev/.ssh"
    "/home/dev/.npm-global/lib/node_modules"
    "/workspace/projects"
)
SESSION_EXPORT="/home/dev/.openclaw/workspace/scripts/export_sessions.py"

4. Set encryption password

# Generate a strong password
openssl rand -base64 32 > ~/.backup-password
chmod 600 ~/.backup-password

5. (Optional) Configure rclone for offsite push

rclone config

Follow prompts to add your cloud storage (Backblaze B2, Google Drive, etc.)

6. Schedule daily run

# Add to crontab (runs at 3am UTC daily)
0 3 * * * export BACKUP_PASSWORD=$(cat ~/.backup-password) && export PATH="$HOME/bin:$PATH" && bash /path/to/vps-backup.sh >> /var/log/vps-backup.log 2>&1

Or schedule via OpenClaw cron:

every: 24h | sessionTarget: isolated | model: glm-5
message: "Run: export BACKUP_PASSWORD=$(cat ~/.backup-password) && export PATH=\"$HOME/bin:$PATH\" && bash /home/dev/scripts/vps-backup.sh"


View on ClawHub
TERMINAL
clawhub install vps-backup

🧪 Use this skill with your agent

Most visitors already have an agent. Pick your environment, install or copy the workflow, then run the smoke-test prompt above.

🔍 Can't find the right skill?

Search 60,000+ AI agent skills — free, no login needed.

Search Skills →