Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

m
Fix cron example/minor error at end of script (cat instead of echo)
Dependencies: sendEmail package for emailing of statistics
== Cron ==I recommend using nice and ionice to run this script so it doesn't bring the host to it's knees. Here is an Place this example from my crontabin /etc/cron. It runs this script every night d/ezvzdump and the backups will run at 3:30 AM and my server is just as responsive as if it wasn't running at allevery day
<pre>
# /etc/cron.d/ezvzdumpSHELL=/bin/bash #This is necessary on Ubuntu where dash is the default shell and is thus used by cron.PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 30 3 * * * root /usr/bin/nice -n 19 n19 /usr/bin/ionice -c3 /usr/local/scripts/ezvzdump> /dev/null 2>&1
</pre>
cat /tmp/vzbackuptimes | sendEmail -f root@`hostname` -t someuser@example.com -u "`hostname` VZ backup statistics." -s mail.example.com #(put your open relay here)
echo
echo cat /tmp/vzbackuptimes
rm /tmp/vzbackuptimes
</pre>
3
edits