OpenClaw Automatic Full and Incremental Backup
Paste the following prompt into your AI chat to install this skill:
Please install @user_a8fdfe0b/openclaw-full-incremental-backup according to https://skillhub.cn/install/skillhub.md.
About this skill
Problem
An OpenClaw working directory can accumulate configuration, plugin, task, and cache files over time. Copying the whole directory repeatedly is slow, can accidentally destroy current state during restore, and may let old backups consume unbounded disk space.
How It Works
The skill uses tar --listed-incremental to create true incremental backups, relying on snapshot state to capture only changed files. The default schedule is an initial full backup, a weekly full backup on Saturday, incremental backups Monday through Friday, and an automatic upgrade to full backup if the last full backup is at least 7 days old. After each backup, it validates the archive with tar -tzf and uses an fcntl lock to prevent concurrent backup jobs from interfering with each other. Before restore, the current directory is copied to .openclaw.pre-restore-timestamp/ to reduce accidental loss. Retention is configured as 30 days for incremental backups and 180 days for full backups, with expired backups cleaned up automatically.
Boundaries
It requires Python 3.8+, GNU tar, and cron, making it suitable for Linux or Unix-like environments that support scheduled jobs. It excludes common cache, credential, and build directories by default, including logs/, plugins/, node_modules/, credentials/, bin/, and obj/; if critical data lives in those locations, review the exclusion rules separately. At least 5GB of free backup space is recommended.
Use Cases
- OpenClaw directory runs long-term, requiring weekly full snapshots plus weekday incremental backups.
- Before restore, automatically preserve a timestamped current-state backup to avoid overwriting state.
- After each archive is created, verify it with tar -tzf and clean up expired incremental backups.
- Prevent concurrent backup jobs from interfering by using a lock so only one backup runs at a time.
Best For
- Ops engineers responsible for OpenClaw environments who want automated backup, retention, and restore protection.
- Engineers using OpenClaw for business data who need safe restore points and protection against accidental deletion.
- Platform engineers managing Linux cron jobs who need a GNU tar-based backup workflow.
- Security or compliance staff who require credential exclusion and pre-restore snapshots.
Related Skills
Analyzes network captures from Wireshark, tcpdump, Fiddler, and Charles, then pinpoints TCP, HTTP, DNS, and TLS issues with filter expressions and remediation steps.
Detects AI-generated images from Stable Diffusion, Midjourney, and GPT-4o via Tencent Cloud image moderation and returns risk scores.
Sets up a baseline Dynamo router, enables KV-aware routing when appropriate, and smoke tests the frontend endpoint locally or on Kubernetes.
CTF cryptography quick reference for engineers covering classic, modern, RSA, ECC, stream, PRNG, and lattice attacks.