# backup-config

Backup OpenClaw configuration directory.

## File Structure

```
backup-config/
├── SKILL.md      # This file
└── run.sh        # Execution script
```

## Configuration

```bash
# Set backup destination (optional, defaults to ~/openclaw-config-BAK)
export BACKUP_DIR=~/backups
```

## Usage

```bash
cd ~/github/data-service-infra-ai-configurations/skills/backup-config
bash run.sh
```

## What It Does

1. Creates backup directory if not exists
2. Compresses all config directories (openclaw-*)
3. Names backup with timestamp: openclaw-config-YYYYMMDD-HHMMSS.tar.gz
4. Cleans up old backups (keeps last 7 days)

## Output

- Backup files: ~/openclaw-config-BAK/
- Backup format: openclaw-config-{date}.tar.gz

## Prerequisites

- OpenClaw config directory: ~/openclaw-config/

## Retention

Default: 7 days. Edit `RETENTION_DAYS` in run.sh to change.
