Last active
December 9, 2015 15:59
-
-
Save rmrf-run/4b4fee763d14d64b1b7a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Place in your /etc/cron.d/ directory | |
### Assumes your git folder is at /root/backup | |
SHELL=/bin/bash | |
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin | |
HOME=/root/ | |
* 2 * * * root cd /root/backup && iptables-save > /root/backup/iptables && git add . && git commit -m "Daily Backup" && git push >> /root/backup/log 2>&1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment