360 Secure SkillHub
360 安全技能中心

Git Backup

运行 bash 脚本,用 git bundle 把 OpenClaw 工作区仓库的全部历史与引用打包成本地备份文件,输出备份路径与大小;非 Git 仓库时明确报错退出,并声明不删除旧备份。资料标记该 Skill 存在矛盾的行动约束与破坏性操作标记。

trumppo
trumppo
热度 90.23
最近更新 2026-05-11 15:54:46
分类:自动化依赖:代码执行 / 读写文件应用场景:DevOps / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add gitbackup
Metadata
name
gitbackup
description
Create a local Git bundle backup of the OpenClaw workspace repository. Use when running /gitbackup in Telegram or when the user asks to back up Git history/refs to a local file.

Git Backup (local bundle)

Overview

Create a self-contained Git bundle of the workspace repo and store it in /root/.openclaw/backups.

Quick start

Run the bundled script:

bash /root/.openclaw/workspace/skills/gitbackup/scripts/git-backup.sh

Output

Print the bundle path and size. The bundle filename includes UTC timestamp.

Notes

  • If the workspace is not a Git repo, exit with a clear error.
  • Do not delete older bundles.