This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Last revisionBoth sides next revision | ||
computing:rsyncrsnapshot [2023/04/10 21:12] – oemb1905 | computing:rsyncrsnapshot [2023/04/10 21:16] – oemb1905 | ||
---|---|---|---|
Line 54: | Line 54: | ||
mail -s " | mail -s " | ||
rm $logfile | rm $logfile | ||
- | chown sexa:sexa -R / | + | chown user:user -R / |
chmod 770 -R / | chmod 770 -R / | ||
else | else | ||
Line 89: | Line 89: | ||
backup | backup | ||
- | Now that the config is setup, you use a script very similar to the localhost script above, but note the syntax changes for sync and alpha that will specify to rsnapshot to use this particular configuration file: | + | Now that the config is setup, you use a script very similar to the localhost script above, but note the syntax changes for sync and alpha that will specify to rsnapshot to use this particular configuration file. Additionally, |
+ | |||
+ | # | ||
+ | service="/ | ||
+ | logfile="/ | ||
+ | host=" | ||
+ | START1=" | ||
+ | touch $logfile | ||
+ | $service -c / | ||
+ | END1=" | ||
+ | DURATION1=$[ ${END1} - ${START1} ] | ||
+ | MINUTES=$[ ${DURATION1} / 60 ] | ||
+ | sed -i " | ||
+ | if | ||
+ | tail -n -5 $logfile | grep " | ||
+ | then | ||
+ | START1=" | ||
+ | echo " | ||
+ | $service -c / | ||
+ | END1=" | ||
+ | DURATION1=$[ ${END1} - ${START1} ] | ||
+ | MINUTES=$[ ${DURATION1} / 60 ] | ||
+ | sed -i " | ||
+ | #echo " | ||
+ | mail -s " | ||
+ | rm $logfile | ||
+ | chown user:user -R / | ||
+ | chmod 770 -R / | ||
+ | else | ||
+ | echo " | ||
+ | mail -s " | ||
+ | rm $logfile | ||
+ | fi | ||