Here i created one script which can help backup some folder on linux server. It will compress the folder into filename.tar.gz and move it into desired folder. It will also backup certain mysql database into filename.sql upon providing mysql login details.

So for example the script can be used to backup website files and mysql database under linux.. If someone pay me $5 i will extend this script to allow backup via ssh and ftp to external server

1. from linux command line, do command: vi backupscript.sh

2. hit "a" key

3. copy & paste this code into it (mouse right click)

Code:
# set -x
echo "
This script will:
1. backup folder of your choice
2. backup mysql database of your choice
3. move above backups into folder You speciffy
----------------------------------------------------------------------"
echo "Now please enter folder path you wish to backup (Kloxo websites folders should be at /home/admin, other control panels, usually /home/yourusername), to use /home/admin, just hit Enter"
read filesfolder


if [ "$filesfolder" = "" ];then
filesfolder=/home/admin
fi


echo "You selected $filesfolder to be backed up."
tar cvzf filesbackup.tar.gz $filesfolder
echo "Backup command executed and finished."


echo "
Now please enter destination path where your files and mysql backups will be moved. To backup into current folder ($(pwd)), just hit Enter"
read destfolder


if [ "$destfolder" = "" ];then
destfolder=$(pwd)
else
destfolder=$destfolder
fi


if [ "$destfolder" != "$(pwd)" ];then
mkdir $destfolder;mv filesbackup.tar.gz $destfolder
echo "Command to moved files backup to $destfolder executed and finished. Files backup DONE."
else
echo "File dont need to be moved. Files backup DONE."
fi
echo "
Please enter your mysql database name"
read dbname
echo "Please enter your mysql username"
read dbusername
echo "Please enter your mysql password"
read dbpass
mysqldump -p$dbpass -u$dbusername $dbname > $dbname_mysql.sql
echo "
Was mysql backup executed successfully or there was an error?
s = successfully
e = i see an error"
read mysqlbckpresult


if [ "$mysqlbckpresult" = "s" ];then
mv *_mysql.sql $destfolder;
echo "Nice, please see your backup files filesbackup.tar.gz and $dbname_mysql.sql in $destfolder"
cd $destfolder;ls;
else
echo "You saw an error? Maybe you entered your mysql database details incorrectly.
d - delete your file backup file to start over
e - exit without deleting files backup file"
read delfilesbckporleave
fi
if [ "$delfilesbckporleave" = "d" ];then
rm -rf $destfolder/filesbackup.tar.gz;
echo "COMPLETE: Command to delete files backup file was executed. You can now start over if you wish."
exit
else
echo "COMPLETE, filesbackup is now available at $destfolder/filesbackup.tar.gz . But mysql backup ended in error."
fi
4. Then do Ctrl + C to cancel editing
5. then do command :wq to write changes and quit Vi editor.
6. Execute script by command sh backupscript.sh and follow on screen instructions

I dont guarantee this script will work. I tested it and it worked, but use it at your own risk please.

If you have any ideas, questions, please add your reply. Thx