Track heartbeat/skills settings, add vault backup script

Settings that were silently lost on reinstall:
- Track .smallclaw/heartbeat/config.json (active hours 8-22, interval 30m)
- Track .smallclaw/skills_state.json (multi-agent-orchestrator enabled)
- Fix gitignore: heartbeat/ → heartbeat/runs/ (only ignore run logs, not config)
- Fix gitignore: remove skills_state.json from ignored list

Vault (contains channel tokens, passwords) cannot go in git — instead:
- Add scripts/backup-vault.sh: backs up vault+credentials to ~/.smallclaw-backup/
  keeping last 5 snapshots. Run manually or via cron (0 3 * * *).
- Run initial backup now → ~/.smallclaw-backup/vault_20260518_232441

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
kim
2026-05-18 23:24:54 +09:00
co-authored by Claude Sonnet 4.6
parent 4f536861bb
commit ac678db97b
5 changed files with 80 additions and 16 deletions
+1 -2
View File
@@ -44,11 +44,10 @@
.smallclaw/tasks/
.smallclaw/jobs/
.smallclaw/ocr-cache/
.smallclaw/heartbeat/
.smallclaw/heartbeat/runs/
.smallclaw/task-heartbeat.json
.smallclaw/cron/runs/
.smallclaw/skills/
.smallclaw/skills_state.json
.smallclaw/workspace_state.json
.smallclaw/.migrated-from-localclaw
+41 -14
View File
@@ -2,7 +2,10 @@
"version": "1.0.1",
"gateway": {
"port": 18789,
"host": ["127.0.0.1","192.168.0.5"],
"host": [
"127.0.0.1",
"192.168.0.5"
],
"auth": {
"enabled": true,
"multiUser": false
@@ -23,12 +26,12 @@
"endpoint": "http://localhost:11434",
"model": ""
},
"lm_studio": {
"endpoint": "http://host.docker.internal:1234",
"llama_cpp": {
"endpoint": "http://localhost:8080",
"model": ""
},
"llama_cpp": {
"endpoint": "http://host.docker.internal:8080",
"lm_studio": {
"endpoint": "http://localhost:1234",
"model": ""
},
"openai": {
@@ -115,10 +118,6 @@
"interval_minutes": 30,
"workspace_file": "HEARTBEAT.md"
},
"search": {
"preferred_provider": "searxng",
"searxng_url": "http://localhost:8888"
},
"workspace": {
"path": "/home/kim/homeclaw/workspace"
},
@@ -130,10 +129,14 @@
},
"channels": {
"telegram": {
"enabled": false,
"botToken": "",
"allowedUserIds": [],
"streamMode": "full"
"enabled": true,
"botToken": "vault:channels.telegram.botToken",
"allowedUserIds": [
8540415328
],
"streamMode": "full",
"userMap": {},
"voiceEnabled": false
},
"discord": {
"enabled": false,
@@ -220,5 +223,29 @@
"provider": "piper",
"model": "ko_KR-kss-medium"
}
},
"search": {
"preferred_provider": "searxng",
"searxng_url": "http://localhost:8888",
"search_rigor": "verified",
"google_cx": "",
"ollama_model": ""
},
"telegram": {
"enabled": true,
"botToken": "8504576825:AAGzpUCFm1z7B6sBRxjHxzin4Sczj0e9o-g",
"allowedUserIds": [
8540415328
],
"streamMode": "full",
"userMap": {},
"voiceEnabled": false
},
"agent_policy": {
"force_web_for_fresh": true,
"memory_fallback_on_search_failure": true,
"auto_store_web_facts": true,
"natural_language_tool_router": true,
"retrieval_mode": "standard"
}
}
}
+7
View File
@@ -0,0 +1,7 @@
{
"enabled": true,
"intervalMinutes": 30,
"activeHoursStart": 8,
"activeHoursEnd": 22,
"notifyEnabled": false
}
+3
View File
@@ -0,0 +1,3 @@
{
"multi-agent-orchestrator": true
}
+28
View File
@@ -0,0 +1,28 @@
#!/bin/bash
# Backup SmallClaw vault and critical settings to ~/.smallclaw-backup/
# Run manually or add to cron: 0 3 * * * bash ~/homeclaw/scripts/backup-vault.sh
set -e
REPO_DIR="$(cd "$(dirname "$0")/.." && pwd)"
BACKUP_DIR="$HOME/.smallclaw-backup"
DATE="$(date +%Y%m%d_%H%M%S)"
mkdir -p "$BACKUP_DIR"
# vault (암호화된 파일 — 비밀번호/토큰 포함)
if [ -d "$REPO_DIR/.smallclaw/vault" ]; then
cp -r "$REPO_DIR/.smallclaw/vault" "$BACKUP_DIR/vault_$DATE"
# 최근 5개만 보관
ls -dt "$BACKUP_DIR"/vault_* 2>/dev/null | tail -n +6 | xargs rm -rf 2>/dev/null || true
echo "✓ vault → $BACKUP_DIR/vault_$DATE"
fi
# credentials
if [ -d "$REPO_DIR/.smallclaw/credentials" ]; then
cp -r "$REPO_DIR/.smallclaw/credentials" "$BACKUP_DIR/credentials_$DATE"
ls -dt "$BACKUP_DIR"/credentials_* 2>/dev/null | tail -n +6 | xargs rm -rf 2>/dev/null || true
echo "✓ credentials → $BACKUP_DIR/credentials_$DATE"
fi
echo "Backup complete: $BACKUP_DIR"