/ Published in: Bash
i've got this running on an hourly cron. works beautifully.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#!/bin/bash TODAY=$(date +%m-%d-%Y) mkdir -p /path/to/backup/$TODAY/ cp /full/path/to/backup.data /path/to/backup/$TODAY/$(date +%s).data #perfect for cron job