Quote Originally Posted by LuDo8 View Post
@Masterbator, I don't need the FTP, I will manually download it everyday, but I just need the script to zip the site folders and mysql into one location. Did I modify your script correctly? And this is for Centos 5-6?

I'm using fake user/pass and locations, so no worries.
Code: 
#!/bin/bash
mysqldump -uLudo8 -pludo8 -hlocalhost ludodb > /var/www/mysite-`date +%d%m%y`.sql
tar -zcvf /var/www/mysite/backups-`date +%d%m%y`.tgz /var/www/mysite/backups*.sql



exit 0
this works for any linux distro mate

i think this script will work for your purpose:
Code: 
#!/bin/bash
mysqldump -uLudo8 -pludo8 -hlocalhost ludodb > /var/www/yoursite/DB-`date +%d-%m-%y`.sql
tar -zcf /var/www/backupfolder/yoursitefull-`date +%d-%m-%y`.tgz /var/www/yoursite/*



exit 0
then you just have to go to /var/www/backupfolder/
and download your full backup (DB+site) from there (the yoursitefull.tgz file)

Quote Originally Posted by LuDo8 View Post
Also is it -uLudo8 or -u Ludo8?
doesn't matter, it will work with or without a space