ensembl-hive  2.5
Bio::EnsEMBL::Hive::RunnableDB::DatabaseDumper Class Reference
+ Inheritance diagram for Bio::EnsEMBL::Hive::RunnableDB::DatabaseDumper:

Public Member Functions

public param_defaults ()
 
public fetch_input ()
 
protected _get_table_list ()
 
- Public Member Functions inherited from Bio::EnsEMBL::Hive::RunnableDB::SystemCmd
public param_defaults ()
 
public run ()
 
public write_output ()
 
public Void complete_early_if_branch_connected ()
 
- Public Member Functions inherited from Bio::EnsEMBL::Hive::Process
public new ()
 
public life_cycle ()
 
public say_with_header ()
 
public enter_status ()
 
public warning ()
 
public param_defaults ()
 
public fetch_input ()
 
public run ()
 
public write_output ()
 
public Bio::EnsEMBL::Hive::Worker worker ()
 
public execute_writes ()
 
public Bio::EnsEMBL::Hive::DBSQL::DBAdaptor db ()
 
public Bio::EnsEMBL::Hive::DBSQL::DBConnection dbc ()
 
public Bio::EnsEMBL::Hive::DBSQL::DBConnection data_dbc ()
 
public Returns run_system_command ()
 
public Bio::EnsEMBL::Hive::AnalysisJob input_job ()
 
public input_id ()
 
public param ()
 
public param_required ()
 
public param_exists ()
 
public param_is_defined ()
 
public param_substitute ()
 
public dataflow_output_id ()
 
public dataflow_output_ids_from_json ()
 
public throw ()
 
public This complete_early ()
 
public Int debug ()
 
public worker_temp_directory ()
 
public worker_temp_directory_name ()
 
public cleanup_worker_temp_directory ()
 

Detailed Description

Synopsis

standaloneJob.pl RunnableDB/DatabaseDumper.pm -exclude_ehive 1 -exclude_list 1 \
-table_list "['peptide_align_%']" -src_db_conn mysql://ensro@127.0.0.1:4313/mm14_compara_homology_67 -output_file ~/dump1.sql

Description

This is a Runnable to dump the tables of a database (by default,
all of them).

The following parameters are accepted:

 - src_db_conn : the connection parameters to the database to be
    dumped (by default, the current eHive database if available)

 - exclude_ehive [boolean=0] : do we exclude the eHive-specific tables
    from the dump

 - table_list [string or array of strings]: the list of tables
    to include in the dump. The '%' wildcard is accepted.

 - exclude_list [boolean=0] : do we consider 'table_list' as a list
    of tables to be excluded from the dump (instead of included)

 - output_file [string] : the file to write the dump to. If the filename
    ends with ".gz", the file is compressed with "gzip" (default parameters)

 - output_db [string] : URL of a database to write the dump to. In this
    mode, the Runnable acts like MySQLTransfer

 - skip_dump [boolean=0] : set this to 1 to skip the dump


The decision process regarding which tables should be dumped is quite complex.
The following sections explain the various scenarios.

1. eHive database

1.a. Hybrid database

If "table_list" is undefined or maps to an empty list, the list
of tables to be dumped is decided accordingly to "exclude_list" (EL)
and "exclude_ehive" (EH). "exclude_list" controls the whole list of
non-eHive tables.

EL EH    List of tables to dump
0  0  => all the tables
0  1  => all the tables, except the eHive ones
1  0  => all the tables, except the non-eHive ones = only the eHive tables
1  1  => both eHive and non-eHive tables are excluded = nothing is dumped

If "table_list" is defined to non-empty list T, the table of decision is:

EL EH    List of tables to dump
0  0  => all the tables in T + the eHive tables
0  1  => all the tables in T
1  0  => all the tables, except the ones in T
1  1  => all the tables, except the ones in T and the eHive ones

1.b. eHive-only database

The decision table can be simplified if the database only contains eHive tables.
In particular, the "exclude_list" and "table_list" parameters have no effect.

EH    List of tables to dump
0  => All the eHive tables, i.e. the whole database
1  => No eHive tables, i.e. nothing

2. non-eHive database

The "exclude_ehive" parameter is ignored.

empty "table_list":
EL    List of tables to dump
0  => all the tables
1  => all the tables are excluded = nothing is dumped

non-empty "table_list" T:
EL    List of tables to dump
0  => all the tables in T
1  => all the tables, except the ones in T


Definition at line 92 of file DatabaseDumper.pm.

Member Function Documentation

◆ _get_table_list()

protected Bio::EnsEMBL::Hive::RunnableDB::DatabaseDumper::_get_table_list ( )

Undocumented method

Code:
click to view

◆ fetch_input()

public Bio::EnsEMBL::Hive::RunnableDB::DatabaseDumper::fetch_input ( )

Undocumented method

Code:
click to view

◆ param_defaults()

public Bio::EnsEMBL::Hive::RunnableDB::DatabaseDumper::param_defaults ( )

Undocumented method

Code:
click to view

The documentation for this class was generated from the following file: