daily_and_weekly_backup_with_rsync
Differences
This shows you the differences between two versions of the page.
Last revisionBoth sides next revision | |||
daily_and_weekly_backup_with_rsync [2009/06/04 15:09] – created k2patel | daily_and_weekly_backup_with_rsync [2009/10/14 03:22] – jt | ||
---|---|---|---|
Line 1: | Line 1: | ||
==== Daily and Weekly Backup with Rsync ==== | ==== Daily and Weekly Backup with Rsync ==== | ||
<code bash | backup-cron.sh> | <code bash | backup-cron.sh> | ||
+ | |||
#!/bin/bash | #!/bin/bash | ||
- | #exclude file will contain strings or directories that should not be archived: | ||
- | #euroco/* | ||
- | #lithium/* | ||
- | # | ||
- | #logs | ||
DAY=$(/ | DAY=$(/ | ||
DOW=$(/ | DOW=$(/ | ||
+ | PATH="/ | ||
if [ $DOW == ' | if [ $DOW == ' | ||
- | / | + | / |
else | else | ||
- | / | + | / |
+ | | ||
fi | fi | ||
+ | for i in $(/ | ||
+ | do | ||
+ | echo " | ||
+ | /bin/rm -Rf $i; | ||
+ | done | ||
</ | </ |