Safe Backup for Openclaw

A cross-platform utility for securely backing up OpenClaw state directories and workspaces while automatically excluding sensitive credentials.

hacksing
v1.0.5
Feb 26, 2026
0
1.9k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install safe-backup

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install safe-backup using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Safe Backup?

Safe Backup is a specialized utility designed to manage the lifecycle of your agent data. As part of the Openclaw Skills ecosystem, it provides a robust mechanism to package configuration files, agent definitions, and memory files into a portable format. It prioritizes security by automatically omitting sensitive information like API tokens and credentials, ensuring that your backups remain safe even if shared or stored in cloud environments.

This skill is essential for developers who need to migrate their AI agent setups between different machines or maintain a disaster recovery plan. By supporting Linux, macOS, and Windows via Git Bash, it ensures consistency across different development environments while leveraging standard Unix tools like rsync and tar for maximum reliability and efficiency.

Safe Backup Use Cases

  • Regular weekly backups to local encrypted storage for disaster recovery.
  • Migrating OpenClaw agent configurations and workspaces to a new development machine.
  • Storing agent state history in private GitHub repositories for offsite redundancy.
  • Automated synchronization of agent data to a remote backup server using rsync.

How Safe Backup Works

  1. The user triggers the backup script which automatically detects the operating system's temporary directory and home paths.
  2. The script utilizes rsync to collect configuration, workspace, and memory files while applying strict exclusion rules for logs and sensitive data.
  3. A compressed tarball is generated in the system's temporary folder, providing a portable snapshot of the agent state.
  4. Users can optionally encrypt the resulting archive using OpenSSL or move it to a private repository for long-term secure storage.
  5. During restoration, the user stops the gateway, extracts the archive, and maps files back to the OpenClaw state directory before re-authenticating services.

Safe Backup Setup

Ensure you have bash and rsync installed. For Windows users, Git Bash or WSL is required. Run the following command to initiate a backup:

~/.openclaw/skills/safe-backup/scripts/backup.sh

To restore from a backup, stop the gateway and extract your files using the following workflow:

systemctl --user stop openclaw-gateway
mkdir -p /tmp/restore
tar -xzf /path/to/safe-backup.tar.gz -C /tmp/restore
cp -r /tmp/restore/state/* ~/.openclaw

Safe Backup Data Schema & Taxonomy

Safe Backup organizes data into a structured archive that mirrors the OpenClaw internal directory while filtering out volatile or sensitive files. This ensures high compatibility across different Openclaw Skills versions.

Directory Included Content
~/.openclaw/ Core configuration files and skill settings
workspace/ Agent workspace files and project data
agents/ Individual agent definitions and logic
memory/ Long-term memory files and context
hooks/ Custom automation hooks and triggers

Note: Sensitive files such as auth-profiles.json, .env, and *.key are strictly excluded from the schema to maintain security.

Safe Backup Advanced Features

  • Automated cross-platform path detection for seamless operation on macOS, Linux, and Windows Git Bash.
  • Support for OpenSSL-based AES-256 encryption to allow for safe storage in public cloud environments.
  • Flexible environment variable support (OPENCLAW_STATE_DIR) for custom installation paths.
  • Built-in integration workflows for rsync-based remote server synchronization.
  • Comprehensive security filtering to prevent accidental leakage of API tokens, session data, and private SSH keys.

SKILL.md


Loading

Related Openclaw Skills

Featured*