---
name: file-backup
version: 1.0.0
description: >-
  Create a timestamped backup copy of a file. Use when the user wants to save
  a copy of a file before making changes.
allowed-tools: Bash(cp:*,wc:*,date:*)
metadata: >-
  {"openclaw":{"emoji":"📦","requires":{"bins":["cp","wc","date"],"env":[]},"install":[]}}
---

# File Backup / 파일 백업

Create a timestamped backup copy of a file.
파일의 타임스탬프 백업 복사본을 생성합니다.

## Usage / 사용법

```bash
bash run.sh <FILE_PATH> [BACKUP_DIR]
```

**Arguments / 인수:**
| # | Name | Description | 설명 |
|---|------|-------------|------|
| 1 | FILE_PATH | Path to the file to back up | 백업할 파일의 경로 |
| 2 | BACKUP_DIR | Where to save the backup (default: same directory) | 백업 저장 위치 (기본값: 같은 디렉토리) |

## Example / 예시

```bash
bash run.sh /home/user/config.yaml /home/user/backups
```

**Output / 출력:**
```
SOURCE: /home/user/config.yaml
BACKUP: /home/user/backups/config.yaml.backup_20260328_143022
SIZE: 1024 bytes
VERIFIED: YES
STATUS: OK
```

## Success / Failure — 성공 / 실패

- **Success / 성공**: `VERIFIED: YES` and `STATUS: OK` (exit code 0) — `VERIFIED: YES`와 `STATUS: OK` (종료 코드 0)
- **Failure / 실패**: `ERROR:` message (exit code non-zero) — `ERROR:` 메시지 (종료 코드 0이 아님)
