Cron Backup
Set up scheduled automated backups with version tracking and cleanup. Use when users need to (1) Schedule periodic backups of directories or files, (2) Monit...
Set up scheduled automated backups with version tracking and cleanup. Use when users need to (1) Schedule periodic backups of directories or files, (2) Monit...
Real data. Real impact.
Emerging
Developers
Per week
Open source
Skills give you superpowers. Install in 30 seconds.
Automated backup scheduling with version detection and intelligent cleanup.
# Backup a directory with timestamp ./scripts/backup.sh /path/to/source /path/to/backup/dirBackup with custom name
./scripts/backup.sh /path/to/source /path/to/backup/dir my-backup
# Set up daily backup at 2 AM ./scripts/setup-cron.sh daily /path/to/source /path/to/backup/dir "0 2 * * *"
# Backup only when version changes ./scripts/backup-versioned.sh /path/to/source /path/to/version/file /path/to/backup/dir
# Keep only last 7 days of backups ./scripts/cleanup.sh /path/to/backup/dir 7
All scripts are in
scripts/ directory:
backup.sh - Single backup executionbackup-versioned.sh - Version-triggered backupsetup-cron.sh - Cron job setupcleanup.sh - Old backup cleanuplist-backups.sh - List available backupsBackups follow the pattern:
{name}_YYYYMMDD_HHMMSS.tar.gz
Examples:
openclabak_20260204_101500.tar.gzmyapp_20260204_000000.tar.gzDecide backup strategy
Run initial backup
./scripts/backup.sh /source /backup
Set up schedule
./scripts/setup-cron.sh daily /source /backup "0 2 * * *"
Configure cleanup
./scripts/setup-cron.sh cleanup /backup "" "0 3 * * *" 7
For software that changes version (like OpenClaw):
Identify version source
openclaw --version/path/to/version.txtSet up versioned backup
./scripts/backup-versioned.sh /app /app/version.txt /backups/app
Schedule version check
./scripts/setup-cron.sh versioned /app /backups/app "0 */6 * * *"
# Backup workspace daily, keep 30 days ./scripts/setup-cron.sh daily /home/user/workspace /backups/workspace "0 2 * * *" ./scripts/setup-cron.sh cleanup /backups/workspace "" "0 3 * * *" 30
# Backup when application updates ./scripts/setup-cron.sh versioned /opt/myapp /backups/myapp "0 */6 * * *" ./scripts/setup-cron.sh cleanup /backups/myapp "" "0 4 * * 0" 10
# Backup multiple directories ./scripts/backup.sh /home/user/.config /backups/config ./scripts/backup.sh /home/user/projects /backups/projects
Standard cron format:
minute hour day month weekday
Common schedules:
0 2 * * *0 */6 * * *0 0 * * 0*/30 * * * *chmod +x scripts/*.sh)systemctl status cron)No automatic installation available. Please visit the source repository for installation instructions.
View Installation Instructions1,500+ AI skills, agents & workflows. Install in 30 seconds. Part of the Torly.ai family.
© 2026 Torly.ai. All rights reserved.