mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 17:51:28 +00:00
Update db_dumper.pl (Database backup) script to only create backups with underscores as space delimiters (db 09-2-2015.sql) vs Now: (db_09_20_2015.sql) [skip ci]
This commit is contained in:
parent
72aaf56c79
commit
4c0a9562ee
@ -15,7 +15,7 @@ $localdrive = "C:"; #::: Where Windows and all Install Programs are...
|
|||||||
$linesep = "---------------------------------------";
|
$linesep = "---------------------------------------";
|
||||||
|
|
||||||
use POSIX qw(strftime);
|
use POSIX qw(strftime);
|
||||||
my $date = strftime "%m-%d-%Y", localtime;
|
my $date = strftime "%m_%d_%Y", localtime;
|
||||||
print "\nTodays Date: " . $date . "\n";
|
print "\nTodays Date: " . $date . "\n";
|
||||||
|
|
||||||
use Config;
|
use Config;
|
||||||
@ -105,7 +105,7 @@ else {
|
|||||||
|
|
||||||
if($t_tables ne ""){
|
if($t_tables ne ""){
|
||||||
$tables_f_l = substr($t_tables_l, 0, 20) . '...';
|
$tables_f_l = substr($t_tables_l, 0, 20) . '...';
|
||||||
$target_file = '' . $tables_f_l . ' ' . $date . '';
|
$target_file = '' . $tables_f_l . '_' . $date . '';
|
||||||
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";
|
||||||
@ -114,7 +114,7 @@ if($t_tables ne ""){
|
|||||||
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 . ' --host ' . $host . ' --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"';
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user