MythTV  0.28pre
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
Functions | Variables
mythconverg_restore.pl File Reference

Go to the source code of this file.

Functions

 our ($username, $homedir, $mythconfdir, $database_information_file)
 
 our ($partial_restore, $with_plugin_data, $restore_xmltvids)
 
 our ($usage, $debug, $show_version, $show_version_script, $dbh)
 
 our ($backup_directory, $backup_filename)
 
 GetOptions ('hostname|DBHostName=s'=>\$db_hostname, 'port|DBPort=i'=>\$db_port, 'username|DBUserName=s'=>\$db_username,#This script does not accept a database password on the command-line.# 'password|DBPassword=s'=>\$db_password, 'name|DBName=s'=>\$db_name, 'schemaver|DBSchemaVer=s'=>\$db_schema_version, 'directory|DBBackupDirectory=s'=>\$backup_directory, 'filename|DBBackupFilename=s'=>\$backup_filename, 'partial_restore|new_hardware|'. 'partial-restore|new-hardware'=>\$partial_restore, 'with_plugin_data|plugin_data|'. 'with-plugin-data|plugin-data'=>\$with_plugin_data, 'restore_xmltvids|'. 'restore-xmltvids|xmltvids'=>\$restore_xmltvids, 'mysql_client|mysql-client|client=s'=>\$mysql_client, 'uncompress=s'=>\$uncompress, 'drop_database|drop_db|'. 'drop-database|drop-db'=>\$drop_database, 'create_database|create_db|mc_sql|'. 'create-database|create-db|mc-sql'=>\$create_database, 'change_hostname|change-hostname'=>\$change_hostname, 'new_hostname|new-hostname=s'=>\$new_hostname, 'old_hostname|old-hostname=s'=>\$old_hostname, 'usage|help|h+'=>\$usage, 'version'=>\$show_version, 'script_version|script-version|v'=>\$show_version_script, 'verbose|debug|d+'=>\$debug)
 
 if ($show_version_script)
 
 elsif ($show_version)
 

Variables

use File::Temp qw tempfile
 
 $NAME = 'MythTV Database Restore Script'
 
 $VERSION = '1.0.18'
 
our mysql_conf
 
our backup_conf
 
 $verbose_level_always = 0
 
 $verbose_level_debug = 1
 
 $verbose_level_error = 255
 
 $d_db_name = 'mythconverg'
 
 $d_mysql_client = 'mysql'
 
 $d_uncompress = 'gzip -d'
 
 $mysql_client = $d_mysql_client
 
 $uncompress = $d_uncompress
 
 $debug = 0
 
 $new_hostname = ''
 
 $old_hostname = ''
 
 $partial_restore = $restore_xmltvids
 
sub print_version_information
 
print $NAME n $script_name nversion
 

Function Documentation

our (   $username,
  $homedir,
  $mythconfdir,
  $database_information_file 
)
our (   $partial_restore,
  $with_plugin_data,
  $restore_xmltvids 
)
our (   $usage,
  $debug,
  $show_version,
  $show_version_script,
  $dbh 
)
our (   $backup_directory,
  $backup_filename 
)
GetOptions ( 'hostname|  DBHostName = s'=,
$db_hostname,
'port|  DBPort = i'=,
$db_port,
'username|  DBUserName = s'=,
$db_username,
#This script does not accept a database password on the command-line.# 'password|  DBPassword = s'=,
$db_password,
'name DBName = s'=,
$db_name,
'schemaver|  DBSchemaVer = s'=,
$db_schema_version,
'directory|  DBBackupDirectory = s'=,
$backup_directory,
'filename DBBackupFilename = s'=,
$backup_filename,
'partial_restore|new_hardware|'. 'partial-restore|new-hardware'  ,
$partial_restore,
'with_plugin_data|plugin_data|'. 'with-plugin-data|plugin-data ,
$with_plugin_data,
'restore_xmltvids|'. 'restore-xmltvids|xmltvids'  ,
$restore_xmltvids,
'mysql_client|mysql-client|  client = s'=,
$mysql_client,
uncompress = s'=,
$uncompress,
'drop_database|drop_db|'. 'drop-database|drop-db'  ,
$drop_database,
'create_database|create_db|mc_sql|'. 'create-database|create-db|mc-sql'  ,
$create_database,
'change_hostname|change-hostname'  ,
$change_hostname,
'new_hostname|new-  hostname = s'=,
$new_hostname,
'old_hostname|old-  hostname = s'=,
$old_hostname,
'usage|help|h+'  ,
$usage,
'version'  ,
$show_version,
'script_version|script-version|v'  ,
$show_version_script,
'verbose|debug|d+'  ,
$debug 
)
if (   $show_version_script)

Definition at line 100 of file mythconverg_restore.pl.

elsif (   $show_version)

Definition at line 105 of file mythconverg_restore.pl.

Variable Documentation

use File::Temp qw tempfile

Definition at line 12 of file mythconverg_restore.pl.

$NAME = 'MythTV Database Restore Script'

Definition at line 15 of file mythconverg_restore.pl.

$VERSION = '1.0.18'

Definition at line 16 of file mythconverg_restore.pl.

our mysql_conf
Initial value:
= ('db_host' => '',
'db_port' => -1,
'db_user' => '',
'db_pass' => '',
'db_name' => '',
'db_schemaver' => ''
)

Definition at line 32 of file mythconverg_restore.pl.

our backup_conf
Initial value:
= ('directory' => '',
'filename' => ''
)

Definition at line 39 of file mythconverg_restore.pl.

$verbose_level_always = 0

Definition at line 44 of file mythconverg_restore.pl.

$verbose_level_debug = 1

Definition at line 45 of file mythconverg_restore.pl.

$verbose_level_error = 255

Definition at line 46 of file mythconverg_restore.pl.

$d_db_name = 'mythconverg'

Definition at line 49 of file mythconverg_restore.pl.

$d_mysql_client = 'mysql'

Definition at line 50 of file mythconverg_restore.pl.

$d_uncompress = 'gzip -d'

Definition at line 51 of file mythconverg_restore.pl.

$mysql_client = $d_mysql_client

Definition at line 54 of file mythconverg_restore.pl.

$uncompress = $d_uncompress

Definition at line 55 of file mythconverg_restore.pl.

$debug = 0

Definition at line 56 of file mythconverg_restore.pl.

$new_hostname = ''

Definition at line 57 of file mythconverg_restore.pl.

$old_hostname = ''

Definition at line 58 of file mythconverg_restore.pl.

$partial_restore = $restore_xmltvids

Definition at line 91 of file mythconverg_restore.pl.

sub print_version_information
Initial value:
{
my $script_name = substr $0, rindex($0, '/') + 1
sub print_version_information my $script_name
my($find_missing, $rescan, $icon_dir, $callsign, $xmltvid, $iconmap, $usage)
sub print_version_information my rindex($0, '/')+1

Definition at line 95 of file mythconverg_restore.pl.

Referenced by elsif().

print $NAME n $script_name nversion

Definition at line 97 of file mythconverg_restore.pl.