<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">
do 'mysql-lib.pl';

# backup_config_files()
# Returns files and directories that can be backed up
sub backup_config_files
{
return &amp;get_all_mysqld_files();
}

# pre_backup(&amp;files)
# Called before the files are actually read
sub pre_backup
{
return undef;
}

# post_backup(&amp;files)
# Called after the files are actually read
sub post_backup
{
return undef;
}

# pre_restore(&amp;files)
# Called before the files are restored from a backup
sub pre_restore
{
if (&amp;is_mysql_running() != -1) {
	%oldconfig = %config;
	}
else {
	%oldconfig = ( );
	}
return undef;
}

# post_restore(&amp;files)
# Called after the files are restored from a backup
sub post_restore
{
$authstr = &amp;make_authstr();
&amp;read_file_cached($module_config_file, \%config);
if (&amp;is_mysql_running() == -1 &amp;&amp; %oldconfig) {
	# New restored login isn't valid .. put back the old one
	$config{'login'} = $oldconfig{'login'};
	$config{'pass'} = $oldconfig{'pass'};
	&amp;save_module_config();
	}
if (&amp;is_mysql_running()) {
	&amp;stop_mysql();
	return &amp;start_mysql();
	}
return undef;
}

1;

</pre></body></html>