daily backup 2026-03-09 23:02:49

This commit is contained in:
Yui Assistant 2026-03-09 23:02:49 +08:00
parent c0e8fdecc5
commit 29d7271c14

16
backup.sh Executable file
View File

@ -0,0 +1,16 @@
#!/bin/bash
cd /root/.openclaw/workspace
# 拉取最新代码避免冲突
git pull origin master
# 添加所有文件(除了.gitignore里的secrets.md
git add .
# 提交
git commit -m "daily backup $(date +'%Y-%m-%d %H:%M:%S')"
# 推送
git push origin master
# 检查是否成功
if [ $? -eq 0 ]; then
echo "✅ Workspace backup success $(date +'%Y-%m-%d')"
else
echo "❌ Workspace backup failed $(date +'%Y-%m-%d')"
fi