-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
Proposal: Improved Backup Design with Configurable Exclusion Rules and Service-Aware Archiving #67990
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:data-lossCan lose, corrupt, or silently drop user/session/config data.Can lose, corrupt, or silently drop user/session/config data.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.Issue quality rating does not apply to this item.staleMarked as stale due to inactivityMarked as stale due to inactivity
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:data-lossCan lose, corrupt, or silently drop user/session/config data.Can lose, corrupt, or silently drop user/session/config data.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.Issue quality rating does not apply to this item.staleMarked as stale due to inactivityMarked as stale due to inactivity
Type
Fields
Priority
None yet
Summary
Propose an improved backup architecture for OpenClaw that addresses current issues with file locking, symlink handling, exclusion rule configurability, and backup size optimization.
Problem Statement
The current
openclaw backup createcommand has several known issues:Proposed Architecture
1. Service-Aware Backup Lifecycle
This solves #67417 by eliminating the race condition between backup enumeration and session cleanup.
2. Configurable Exclusion Rules
Exclusion rules should be stored in a config file, not hardcoded:
{ "excluded_extensions": ["log", "tmp", "pyc", "bak", "swp"], "excluded_folders": [ "node_modules", ".git", "__pycache__", ".venv", "extensions", "browser", "delivery-queue", "flows", "skills-backup" ], "excluded_files": [".DS_Store", "Thumbs.db"] }Why this matters: Every OpenClaw installation is different. Some users have 100+ skills, some run in environments with
node_modulesor browser caches. Without configurability, backups either include gigabytes of rebuildable data or exclude things users actually need.3. Symlink-Aware Traversal
Skip symbolic links and junction points entirely using
FileAttributes.ReparsePoint(Windows) orlstatchecks (Unix). This prevents:projects -> /d/Research/Projects)4. Output Format
Use
tar.gzfor universal compatibility:C:\Users\...\) for disaster recoverytar -xzf backup.tar.gz5. Two Backup Modes
config-onlyfullReference Implementation
I built a standalone tool implementing this design:
System.Formats.Tar+GZipStream)Related Issues
Impact
This would give OpenClaw users: