Script to download mysqldump result from server by PHP script.
On linux server in www directory create file
You must have mysql-client installed.
On your home PC or VPS/virtual server make in www directory file:
Now configure CRON to execute this script every hour/day and you have auto backup on external server 
On linux server in www directory create file
PHP:
backup.php
PHP:
<?PHP
$access_password = '';
$mysql_user = 'root';
$mysql_password = 'your_password';
if(!isset($_REQUEST['password']) || !isset($_REQUEST['database']))
die('This script require password and database name. At end of URL to this script add: ?password=HERE_YOUR_PASSWORD&database=DATABASE_NAME_HERE');
if(empty($access_password))
die('\$access_password cannot be empty, edit config in script.');
if(empty($_REQUEST['database']))
die('Database name cannot be empty.');
if($_REQUEST['password'] != $access_password)
die('Wrong password.');
$data = '';
exec('mysqldump -u ' . $mysql_user . ' -p' . $mysql_password . ' --databases ' . $_REQUEST['database'], $data);
echo implode(chr(10), $data);
?>
PHP:
apt-get install mysql-client
PHP:
<?PHP
$access_password = '';
$database_name = 'theforgottenserver';
$data = file_get_contents('http://your-dedic-domain.com/backup.php?database=' . $database_name . '&password=' . $access_password);
file_put_contents('backup_' . time() . '.sql', $data);
?>
