I Write script that make a zip file with /var/www Directory And mysqldump db And upload it via ftp And change mode to executable file And put It in cron tab
but file doesn't upload !!!
#!/bin/bash mysqldump -u root -h localhost -p123456 --all-databases > /tmp/test/databases.sql tar cfz /tmp/test/databases.sql /var/www /tmp/test/zip.tar.tgz ftp -n <<EOF open $server user $user $password put /tmp/test/zip.tar.tgz EOF
Put it in crontab
but when crontab has been worked , just the zip file was created and it doesn't uploaded