mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-04 00:02:24 +00:00
Update db_dumper.pl to allow remote host backups
This commit is contained in:
parent
0c7a861caf
commit
58b5f6b88f
@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user