Tuesday, October 23, 2012

Easy Twiki backup

#!/bin/sh
cd /var/www
/etc/init.d/httpd stop
sleep 5
tar -zcf twiki.tgz twiki
mv twiki.tgz /home/public/sync/
/etc/init.d/httpd start
cd /home/public/sync
ls -la | mail -s "backup $HOSTNAME -'date'" myUser@myDomain.com

No comments:

Post a Comment