mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 00:46:46 +00:00
Update db_dumper.pl to allow remote host backups
This commit is contained in:
@@ -109,15 +109,15 @@ if($t_tables ne ""){
|
|||||||
print "Performing table based backup...\n";
|
print "Performing table based backup...\n";
|
||||||
#::: Backup Database...
|
#::: Backup Database...
|
||||||
print "Backing up Database " . $db . "... \n\n";
|
print "Backing up Database " . $db . "... \n\n";
|
||||||
$cmd = 'mysqldump -u' . $user . ' --max_allowed_packet=512M --password="' . $pass . '" ' . $db . ' ' . $t_tables . ' > "' . $B_LOC[1] . '' . $file_app . '' . $target_file . '.sql"';
|
$cmd = 'mysqldump -u' . $user . ' --host ' . $host . ' --max_allowed_packet=512M --password="' . $pass . '" ' . $db . ' ' . $t_tables . ' > "' . $B_LOC[1] . '' . $file_app . '' . $target_file . '.sql"';
|
||||||
printcmd($cmd);
|
printcmd($cmd);
|
||||||
system($cmd);
|
system($cmd);
|
||||||
}
|
}
|
||||||
else{ #::: Entire DB Backup
|
else{ #::: Entire DB Backup
|
||||||
$target_file = '' . $db . ' ' . $date . '';
|
$target_file = '' . $db . ' ' . $date . '';
|
||||||
#::: Backup Database...
|
#::: Backup Database...
|
||||||
print "Backing up Database " . $db . "... \n\n";
|
print "Backing up Database " . $db . "... \n\n";
|
||||||
$cmd = 'mysqldump -u' . $user . ' --max_allowed_packet=512M --password="' . $pass . '" ' . $db . ' > "' . $B_LOC[1] . '' . $file_app . '' . $target_file . '.sql"';
|
$cmd = 'mysqldump -u' . $user . ' --host ' . $host . ' --max_allowed_packet=512M --password="' . $pass . '" ' . $db . ' > "' . $B_LOC[1] . '' . $file_app . '' . $target_file . '.sql"';
|
||||||
printcmd($cmd);
|
printcmd($cmd);
|
||||||
system($cmd);
|
system($cmd);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user