Log in

View Full Version : Backing up database player tables with perl eqemu_server.pl ?


Zandig
02-13-2021, 10:41 AM
Using the Perl script: perl eqemu_server.pl
and selecting --> database --> backup_player_tables

creates a full backup of the database, which is the same size and number of lines as creating a database backup using -- backup_database.

I've noticed that the file ' character_table_list.txt ' when created is an empty/0 byte file

Enter a command #> backup_player_tables
[Update] No script update necessary...
[Database] Performing database backup of player tables....
[Download] Saved [backups/character_table_list.txt] from [https://raw.githubusercontent.com/EQEmu/Server/master/utils/sql/character_table_list.txt]

Is the file missing from the Github?
It would seem the command: backup_player_tables
would just backup the player tables unless I'm getting confused here ?

Zandig
02-17-2021, 12:08 PM
Looked into this a bit further inside the eqemu_server.pl file, at this particular section:

sub database_dump_player_tables
{
check_for_database_dump_script();
print "[Database] Performing database backup of player tables....\n";
get_remote_file($eqemu_repository_request_url . "utils/sql/character_table_list.txt",
"backups/character_table_list.txt");

$tables = "";
open(FILE, "backups/character_table_list.txt");
$i = 0;
while (<FILE>) {
chomp;
$o = $_;
$tables .= $o . ",";
}
$tables = substr($tables, 0, -1);

print `perl database_dumper.pl database="$db" loc="backups" tables="$tables" backup_name="player_tables_export" nolock`;

print "[Database] Press any key to continue...\n";

The file "character_table_list.txt" is not being found or is empty at the URL:
"https://raw.githubusercontent.com/EQEmu/Server/master/utils/sql/character_table_list.txt"
and is therefore creating an empty file which in turn backs up the entire database.

The solution for now is to back up your player tables manually until the character_table_list.txt file is available.