This is exactly what I would like to setup.
Could someone help me convert DJMaze's example script into a working one?
Does this get left alone?
| Code:: |
FILE=cpgcms-`date +%Y%m%d%H%M`.sql |
I gather this is the filename it will save as?
| Code:: |
DIR=/PATH/TO/backup/DIR/`date +%Y%m%d`/ |
Which directory do I need to setup here? The path to where I want the backup saved? Does it get deleted when it's been emailed? e.g. would a correct line look like-
| Code:: |
DIR=/home/norbie/backups/`date +%Y%m%d`/ |
Does it need to be in the www folder?
I imagine nothing needs changing here again?
| Code:: |
mysqldump -f -hSERVERIP -uUSERNAME -pPASSWORD DBNAME --add-drop-table | gzip -9c >${DIR}${FILE}.gz |
Do I keep the -h and -u and -p infront of my username and password when I have filled them in? How come the DBNAME section doesn't have a letter in front of it?
| Code:: |
uuencode ${DIR}${FILE}.gz ${FILE}.gz | mail WEBMASTER @ MYSITE.COM |
And here I just enter my email address?
Sorry there's so many questions, I just wanna get this cool feature working!
I would look in the old Geek Forums, but it seems to be disabled!
Thanks to anyone who can spare a little time!