πŸ”„ rc-cleanup-bones.sh Reference

rc-cleanup-bones.sh

Purpose: Backup and prune unneeded directories and templates from bones/

CLI Interface

rc-cleanup-bones.sh [--dry-run] [--verbose] [--help] [--days N]

Supported flags:

Workflow Steps

  1. Parse Flags & Setup
    • Ensure bones/archive/cleanup-backups/ and bones/logs/ exist.
    • Process --dry-run, --verbose, and --days.
  2. Backup
    • Create a tar.gz of the entire bones/ directory (excluding its own backups folder) into bones/backups/.
  3. Prune Old Backups
    • Delete backup archives older than N days.
  4. Prune Logs
    • Delete log files in bones/logs/ older than N days.
  5. Summary
    • Log completion message indicating backup and prune results.

Examples

# Preview cleanup without writing
./bones/scripts/rc-cleanup-bones.sh --dry-run --verbose

# Perform cleanup with a 14-day retention window
./bones/scripts/rc-cleanup-bones.sh --days 14

# Show help
./bones/scripts/rc-cleanup-bones.sh --help

Author:

Project: Rotkeeper

Version: v0.2.3-pre

License: