Skip to main content

A local backup utility for OpenClaw workspaces

Project description

ClawBackup

ClawBackup banner

A local backup utility for OpenClaw workspaces, built for fast first-run setup, scheduled backups, and clean CLI-based recovery workflows.

Languages: English | 简体中文 | 日本語 | 한국어 | Deutsch

OpenClaw Backup Utility Python 3.10+ CLI Multilingual MIT License

Why ClawBackup | What It Backs Up | Core Capabilities | Quick Start | First Run | Development & Release

Why ClawBackup

An OpenClaw workspace usually contains more than just one config file. It often includes credentials, agent profiles, memory files, workspace data, and scheduled tasks. Copying these files manually is easy once, but hard to keep consistent over time.

ClawBackup is designed to make local backup simple and repeatable:

  • complete the first backup with a clean CLI flow
  • enable scheduled backups without heavy setup
  • review, restore, or remove old archives when needed
  • install and distribute it using standard Python packaging workflows

ClawBackup fits especially well for:

  • individual OpenClaw users who want dependable local backups
  • users who frequently edit agent configuration and want rollback safety
  • teams that want a standardized backup utility instead of manual file copy steps

What It Backs Up

By default, ClawBackup backs up these OpenClaw files and directories:

  • openclaw.json: main config file
  • credentials/: API keys and tokens
  • agents/: agent configs and auth profiles
  • workspace/: memory files, SOUL.md, and user files
  • cron/: scheduled task configuration

Default paths:

  • OpenClaw data directory: ~/.openclaw
  • Backup output directory: ~/openclaw-backups
  • Compression format: zip
  • Default retention policy: keep latest 10, keep at least 3, remove anything older than 30 days

Core Capabilities

Clean user-first CLI

The default home screen keeps the main workflow focused on four high-frequency actions:

  • Back Up Now
  • Schedule
  • Reset Config
  • Exit

Advanced commands such as history, config inspection, and logs are still available from the CLI, but they do not overload the first screen.

Multilingual startup

The app currently supports:

  • English
  • Simplified Chinese
  • Japanese
  • Korean
  • German

Scheduled backups

Built-in scheduling presets include:

  • every 6 hours
  • daily at 02:00
  • every Sunday at 02:00
  • monthly on day 1 at 02:00
  • custom cron expressions

Retention control

ClawBackup supports both “keep all backups” and “keep only the latest N backups” retention strategies.

History and restore

For generated archives, ClawBackup supports:

  • browsing backup history
  • restoring a selected backup
  • deleting a single backup archive

Quick Start

Recommended: install with pipx

If pipx is not installed yet:

python3 -m pip install --user pipx
python3 -m pipx ensurepath

Close the current terminal, open a new one, then install the stable release directly from the wheel:

pipx install "https://github.com/Yuan-lab-LLM/ClawBackup/releases/download/v0.1.1/clawbackup-0.1.1-py3-none-any.whl"

After the project is published to PyPI, the same install becomes:

pipx install clawbackup

Run:

clawbackup

Install the latest code from main

pipx install --force "git+https://github.com/Yuan-lab-LLM/ClawBackup.git@main"

Install from local source

If you already cloned the repository:

python3 -m pip install .

or:

pipx install .

Install with pip

If you prefer pip instead of pipx, install the published wheel directly:

python3 -m pip install "https://github.com/Yuan-lab-LLM/ClawBackup/releases/download/v0.1.1/clawbackup-0.1.1-py3-none-any.whl"

After PyPI publishing is enabled, users can also install with:

python3 -m pip install clawbackup

First Run

Recommended first-run flow:

  1. launch clawbackup
  2. confirm or adjust the source and backup directories
  3. run the first backup
  4. configure scheduling only if you want automatic execution

Shortest path:

clawbackup

If you prefer direct commands:

clawbackup init
clawbackup backup

Common Commands

Main workflow

clawbackup
clawbackup init
clawbackup backup
clawbackup schedule
clawbackup reset

Advanced commands

clawbackup history
clawbackup config
clawbackup log

Upgrade and Uninstall

Upgrade to the latest main branch

pipx install --force "git+https://github.com/Yuan-lab-LLM/ClawBackup.git@main"

Upgrade or install a specific version

pipx install --force "https://github.com/Yuan-lab-LLM/ClawBackup/releases/download/v0.1.1/clawbackup-0.1.1-py3-none-any.whl"

Uninstall

If installed with pipx:

pipx uninstall clawbackup

If installed with pip:

python3 -m pip uninstall clawbackup

Local Files

Runtime files:

  • config file: ~/.config/clawbackup/config.json
  • log file: ~/.config/clawbackup/clawbackup.log

If you want to fully reset local state, use the in-app reset flow or remove the config file manually.

Development and Release

Run locally

python3 clawbackup.py

or:

python3 -m clawbackup

Syntax check

python3 -m py_compile clawbackup.py src/clawbackup/cli.py src/clawbackup/__init__.py

Version locations

Before release, keep these locations aligned:

  • pyproject.toml
  • src/clawbackup/__init__.py
  • UI version text inside src/clawbackup/cli.py

Homebrew files

The repository already contains Homebrew-related files:

  • Formula/clawbackup.rb
  • scripts/render_homebrew_formula.py
  • scripts/homebrew_sha256.sh
  • scripts/test_homebrew_local.sh

Release checklist

Recommended release flow:

  1. update version numbers
  2. commit changes
  3. create a tag such as v0.1.1
  4. push main and the tag
  5. verify the GitHub Release
  6. sync the Homebrew formula if needed

Common commands:

git add .
git commit -m "Release v0.1.1"
git tag v0.1.1
git push origin main --tags

Publish to PyPI

This repository is prepared for PyPI publishing through GitHub Actions trusted publishing.

Before the first publish:

  1. create the clawbackup project on PyPI
  2. in PyPI project settings, add a trusted publisher for:
    • owner: Yuan-lab-LLM
    • repository: ClawBackup
    • workflow: publish-pypi.yml
    • environment: pypi
  3. in GitHub, approve the pypi environment if your org requires environment review

After that, the publish flow is:

  1. build and verify the package locally if needed
  2. create and push a release tag such as v0.1.2
  3. open GitHub Actions and run the Publish PyPI workflow, or trigger it from a published release
  4. verify the package on PyPI

Once PyPI publishing is live, end users can install with:

pipx install clawbackup

or:

python3 -m pip install clawbackup

License

This project is released under the MIT License.

Contributing

Issues and pull requests are welcome, especially around OpenClaw backup flows, restore workflows, and scheduling improvements.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clawbackup-0.1.1.tar.gz (27.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

clawbackup-0.1.1-py3-none-any.whl (24.6 kB view details)

Uploaded Python 3

File details

Details for the file clawbackup-0.1.1.tar.gz.

File metadata

  • Download URL: clawbackup-0.1.1.tar.gz
  • Upload date:
  • Size: 27.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for clawbackup-0.1.1.tar.gz
Algorithm Hash digest
SHA256 22db97c71be38e8d0b6de49d83abbf2ec69df79bd1d376298b82b0be7882523e
MD5 e012216bdc93d25212ff2f6be0b3257a
BLAKE2b-256 de92a6730d94fc7d5b776529391064315719fa1948a60cb4950bca2734c9eed9

See more details on using hashes here.

Provenance

The following attestation bundles were made for clawbackup-0.1.1.tar.gz:

Publisher: publish-pypi.yml on Yuan-lab-LLM/ClawBackup

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file clawbackup-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: clawbackup-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 24.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for clawbackup-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 829337246cb88b51dfb2e719d9e06b99880399dab947743d717d005a0dcb6045
MD5 809b238a7022298c400fafb3ea4d1feb
BLAKE2b-256 15496ea11c88c4b49195ed1ca6e59df2984457412033c5ca3234045eb359a5bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for clawbackup-0.1.1-py3-none-any.whl:

Publisher: publish-pypi.yml on Yuan-lab-LLM/ClawBackup

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page