Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
mobi_backup [26.09.2018 15:50]
Pascal Suter [Error due to old flock version]
mobi_backup [26.09.2018 15:53] (current)
Pascal Suter [MOBI Backup (rsync wrapper)]
Line 335: Line 335:
 rm -f /​tmp/​backupReport.txt rm -f /​tmp/​backupReport.txt
 </​code>​ </​code>​
 +===== run daily =====
 +in order to run the backup daily, run ''​crontab -e''​ as user ''​root''​ and enter a new line like this one here: 
 +  00 1 * * * /​opt/​mobi.sh > /dev/null 2>&1
 +using the redirects of both stdout and stderr to ''/​dev/​null''​ makes sure you don't receive two emails on every backup where one would come through cron. all the necessary info is logged and the summary is emailaed directly without needing cron to send us any info. 
 +
 ===== Error due to old flock version ===== ===== Error due to old flock version =====
 when this script is run on an older linux distribution such as CentOS 6.5 for example, the provided version of flock is too old to know the ''​-E''​ option which specifies an exit code in case the lock could not be acquired. in such a situation you can patch the mobi.sh script using this command: ​ when this script is run on an older linux distribution such as CentOS 6.5 for example, the provided version of flock is too old to know the ''​-E''​ option which specifies an exit code in case the lock could not be acquired. in such a situation you can patch the mobi.sh script using this command: ​