mythconverg_backup.pl File Reference

Go to the source code of this file.

Functions

 our ($username, $homedir, $mythconfdir, $database_information_file)
 our ($mysqldump, $compress, $rotate, $rotateglob, $backup_xmltvids)
 our ($backup_directory, $backup_filename)
 our ($verbose_level_always, $verbose_level_debug, $verbose_level_error)
 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, 'mysqldump=s'=>\$mysqldump, 'compress=s'=>\$compress, 'rotate=i'=>\$rotate, 'rotateglob|glob=s'=>\$rotateglob, 'backup_xmltvids|backup-xmltvids|'. 'xmltvids'=>\$backup_xmltvids, 'usage|help|h+'=>\$usage, 'version'=>\$show_version, 'script_version|script-version|v'=>\$show_version_script, 'verbose|debug|d+'=>\$debug)
sub print_version_information my rindex ($0, '/')+1
 if ($show_version_script)
 elsif ($show_version)
 verbose ($verbose_level_debug," - checking: $file")
return unless ($file &&-e $file)
 verbose ($verbose_level_debug," parsing: $file")
 open (CONF, $file) or die("\nERROR
 if ((!-d $backup_conf{'directory'})||(!-w $backup_conf{'directory'}))
 if (!$backup_conf{'filename'})
return if (!$debug)

Variables

use File::Temp qw tempfile
 $NAME = 'MythTV Database Backup Script'
 $VERSION = '1.0.11'
our mysql_conf
our backup_conf
our $is_env_tainted = 1
our $old_env_path = $ENV{"PATH"}
our d_allowed_paths
our allowed_paths
 $verbose_level_always = 0
 $verbose_level_debug = 1
 $verbose_level_error = 255
 $d_db_name = 'mythconverg'
 $d_mysqldump = 'mysqldump'
 $d_compress = 'gzip'
 $d_rotate = 5
 $d_rotateglob = $d_db_name.'-????-??????????????.sql*'
 $mysqldump = $d_mysqldump
 $compress = $d_compress
 $rotate = $d_rotate
 $rotateglob = $d_rotateglob
 $debug = 0
sub print_version_information my $script_name = substr $0
print $NAME n $script_name nversion
 __pad0__
 stopped
if it exists
if it should be a database $database_information_file = shift
 configure_environment
 read_config
 check_config
 print_configuration
my $status = 1

Function Documentation

our ( username,
homedir,
mythconfdir,
database_information_file 
)
our ( mysqldump,
compress,
rotate,
rotateglob,
backup_xmltvids 
)
our ( backup_directory,
backup_filename 
)
our ( verbose_level_always,
verbose_level_debug,
verbose_level_error 
)
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,
mysqldump = s'=,
\$  mysqldump,
compress = s'=,
\$  compress,
rotate = i'=,
\$  rotate,
'rotateglob|  glob = s'=,
\$  rotateglob,
'backup_xmltvids|backup-xmltvids|'. 'xmltvids'  ,
\$  backup_xmltvids,
'usage|help|h+'  ,
\$  usage,
'version'  ,
\$  show_version,
'script_version|script-version|v'  ,
\$  show_version_script,
'verbose|debug|d+'  ,
\$  debug 
)
sub print_version_information my rindex ( 0,
'/'   
)
Type Constraints
if ( show_version_script  ) 

Definition at line 1455 of file mythconverg_backup.pl.

elsif ( show_version  ) 

Definition at line 106 of file mythconverg_backup.pl.

verbose ( verbose_level_debug,
" - checking: $file"   
)
return unless ( $file &&-e $  file  ) 
verbose ( verbose_level_debug,
" parsing: $file"   
)
open ( CONF  ,
file 
)

Definition at line 477 of file mythconverg_backup.pl.

Referenced by cc_open(), MediaMonitorUnix::CheckMountable(), cCiHandler::CreateCiHandler(), createTempFile(), DVBStreamHandler::CycleFiltersByPriority(), DVBCam::DVBCam(), DVDOpen(), FIFOWriter::FIFOWriteThread(), FileLogger::FileLogger(), VBIDevice::fillSelectionsFromDir(), VideoDevice::fillSelectionsFromDir(), MythSystemUnix::Fork(), AudioOutputOSS::GetOutputSettings(), if(), JoystickMenuThread::Init(), ZMServer::initMonitor(), main(), NuppelVideoRecorder::MJPEGInit(), mythfile_open(), V4LChannel::Open(), ThreadedFileWriter::Open(), NuppelVideoRecorder::Open(), MSocketDevice::open(), ImportRecorder::Open(), DVBPIDInfo::Open(), DVBChannel::Open(), AudioInputOSS::Open(), ASIStreamHandler::Open(), MainServer::OpenAndUnlink(), MythMediaDevice::openDevice(), AudioOutputOSS::OpenDevice(), FileRingBuffer::OpenFile(), MpegRecorder::OpenMpegFileAsInput(), MpegRecorder::OpenV4L2DeviceAsInput(), V4LRecorder::OpenVBIDevice(), HDPVRConfigurationGroup::probeCard(), MPEGConfigurationGroup::probeCard(), V4LConfigurationGroup::probeCard(), CardUtil::ProbeDVBFrontendName(), CardUtil::ProbeDVBType(), CardUtil::ProbeV4LAudioInputs(), CardUtil::ProbeV4LVideoInputs(), DeleteThread::ProcessNew(), MSqlDatabase::Reconnect(), FileLogger::reopen(), MpegRecorder::run(), DVBStreamHandler::RunTS(), MythCDROMLinux::setSpeed(), MythCDROMDarwin::setSpeed(), MPEG2replex::Start(), MpegRecorder::StartEncoding(), DVBStreamHandler::SupportsTSMonitoring(), RTCVideoSync::TryInit(), DRMVideoSync::TryInit(), vbi_open(), AudioOutputOSS::VolumeInit(), MPEG2fixup::WriteData(), and MPEG2fixup::WriteYUV().

if ( (!-d $backup_conf{'directory'})||(!-w $backup_conf{'directory'})   ) 

Definition at line 858 of file mythconverg_backup.pl.

if (  ) 

Definition at line 923 of file mythconverg_backup.pl.

return if ( !$  debug  ) 

Definition at line 113 of file bbccurrentxml.pl.


Variable Documentation

use File::Temp qw tempfile

Definition at line 12 of file mythconverg_backup.pl.

$NAME = 'MythTV Database Backup Script'

Definition at line 15 of file mythconverg_backup.pl.

$VERSION = '1.0.11'

Definition at line 16 of file mythconverg_backup.pl.

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

Definition at line 30 of file mythconverg_backup.pl.

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

Definition at line 37 of file mythconverg_backup.pl.

our $is_env_tainted = 1

Definition at line 42 of file mythconverg_backup.pl.

our $old_env_path = $ENV{"PATH"}

Definition at line 43 of file mythconverg_backup.pl.

Initial value:
 ("/bin",
                            "/usr/bin",
                            "/usr/local/bin",
                            "/sbin",
                            "/usr/sbin",
                            "/usr/local/sbin"
                           )

Definition at line 44 of file mythconverg_backup.pl.

Definition at line 51 of file mythconverg_backup.pl.

$verbose_level_always = 0

Definition at line 54 of file mythconverg_backup.pl.

Referenced by if().

$verbose_level_debug = 1

Definition at line 55 of file mythconverg_backup.pl.

$verbose_level_error = 255

Definition at line 56 of file mythconverg_backup.pl.

$d_db_name = 'mythconverg'

Definition at line 59 of file mythconverg_backup.pl.

$d_mysqldump = 'mysqldump'

Definition at line 60 of file mythconverg_backup.pl.

$d_compress = 'gzip'

Definition at line 61 of file mythconverg_backup.pl.

$d_rotate = 5

Definition at line 62 of file mythconverg_backup.pl.

$d_rotateglob = $d_db_name.'-????-??????????????.sql*'

Definition at line 63 of file mythconverg_backup.pl.

$mysqldump = $d_mysqldump

Definition at line 66 of file mythconverg_backup.pl.

Referenced by open().

$compress = $d_compress

Definition at line 67 of file mythconverg_backup.pl.

Referenced by open().

$rotate = $d_rotate

Definition at line 68 of file mythconverg_backup.pl.

Referenced by open().

$rotateglob = $d_rotateglob

Definition at line 69 of file mythconverg_backup.pl.

Referenced by open().

$debug = 0

Definition at line 70 of file mythconverg_backup.pl.

sub print_version_information my $script_name = substr $0

Definition at line 97 of file mythconverg_backup.pl.

print $NAME n $script_name nversion

Definition at line 98 of file mythconverg_backup.pl.

Definition at line 705 of file mythconverg_backup.pl.

if it exists

Definition at line 1444 of file mythconverg_backup.pl.

Referenced by AlbumArtImages::addImage(), UPnpCDSVideo::AddItem(), UPnpCDSTv::AddItem(), Content::AddRecordingLiveStream(), PathSetting::addSelection(), Video::AddVideo(), Content::AddVideoLiveStream(), DBUtil::BackupDB(), CetonStreamHandler::CetonStreamHandler(), RingBuffer::Create(), MetadataResultsDialog::Create(), ImageSearchResultsDialog::Create(), MythBrowser::Create(), VideoDialog::CreatePlayMenu(), EditAlbumartDialog::customEvent(), SingleView::DisplayNext(), GLSingleView::DisplayNext(), SingleView::DisplayPrev(), GLSingleView::DisplayPrev(), DBUtil::DoBackup(), BurnMenu::doBurn(), NetTree::doDownloadAndPlay(), NetSearch::doDownloadAndPlay(), MythWebView::doDownloadRequested(), GLSingleView::EffectKenBurns(), NativeArchive::exportRecording(), Metadata::Filename(), XmltvID::fillSelections(), findIcon(), RomInfo::FindImage(), MythUIHelper::FindThemeFile(), ImportNative::finishedPressed(), HTTPRequest::FormatFileResponse(), get_filename(), Content::GetAlbumArt(), Metadata::getAlbumArtFile(), DBUtil::GetBackupDirectory(), Guide::GetChannelIcon(), VideoDialog::GetCoverImage(), SSDPExtension::GetFile(), Content::GetFile(), Content::GetImageFile(), VideoDialog::GetImageFromFolder(), InternetContent::GetInternetContent(), InternetContent::GetInternetSearch(), Content::GetMusic(), MetadataDownload::getMXMLPath(), MetadataDownload::getNFOPath(), GetPlaybackURL(), Content::GetPreviewImage(), Content::GetRecording(), ImageView::GetScreenShot(), DVDThemeSelector::getThemeList(), Content::GetVideo(), Channel::GetXMLTVIdList(), MainServer::HandleQueryCheckFile(), ATSCStreamData::HasCachedCVCT(), ATSCStreamData::HasCachedTVCT(), NativeArchive::importRecording(), ImportIconsWizard::initialLoad(), MythBurn::isArchiveItemValid(), isRemote(), Jitterometer::Jitterometer(), LircDaemonDevice(), ThemeChooser::Load(), MythBurn::loadEncoderProfiles(), mythfile_exists(), MythImageReader::MythImageReader(), MythCDROM::onDeviceMounted(), FileRingBuffer::OpenFile(), MythMediaDevice::performMountCmd(), HtmlServerExtension::ProcessRequest(), ProgramInfo::ProgramInfo(), ThumbItem::Remove(), EditAlbumartDialog::removeCachedImage(), GalleryUtil::Rename(), GalleryUtil::RenameDirectory(), MetadataImageDownload::run(), RunCCExtract(), runScan(), MythBurn::runScript(), ExportNative::runScript(), XmlConfiguration::Save(), showLogViewer(), NetSearch::showMenu(), NetTree::slotItemChanged(), RSSEditPopup::slotSave(), MythMainWindow::StartLIRC(), DVDThemeSelector::themeChanged(), RecordingSelector::titleChanged(), GameHandler::UpdateGameDB(), MythNews::updateInfoView(), NetTree::UpdateItem(), ImportCoverArtDialog::updateStatus(), XNVCTRLQueryTargetAttribute(), XNVCTRLQueryTargetBinaryData(), XNVCTRLQueryTargetStringAttribute(), XNVCTRLQueryValidTargetAttributeValues(), and NativeArchive::~NativeArchive().

if it should be a database $database_information_file = shift

Definition at line 1446 of file mythconverg_backup.pl.

Definition at line 1448 of file mythconverg_backup.pl.

Definition at line 1449 of file mythconverg_backup.pl.

Definition at line 1450 of file mythconverg_backup.pl.

Definition at line 1452 of file mythconverg_backup.pl.

exit $status = 1

Definition at line 1454 of file mythconverg_backup.pl.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends
Generated on Sun May 27 06:41:46 2012 for MythTV by  doxygen 1.6.3