ó n[Qc@sLdZddlZddlZddlZddlmZddlmZmZddlm Z ddlm Z m Z ddlm Z m Z ddlmZmZdd lmZmZmZdd lmZmZdd lmZd Zd ZdZdddgZdddgZd„Ze ejjejdƒeeƒZ ee dde!ƒe j"ddddddddd d!d"d#d$eƒe j"d%d&dddd'ddd d(d"d#d$eƒe j"d)d*dd+dd,de#d d-ƒe j"d.d/dd+dd0de#d d1ƒe j"d2dd+dd3de#d d4ƒe j"d5dd+dd6de#d d7ƒe j"d8d9dd:dd;d"d<ddd d=ƒee d>ƒe e ƒe e e!ƒee ƒee ƒee dƒee ƒe j"d?dd+de#dd@d dAƒe j"dBdd+de#ddCd dDƒe j%ƒ\Z&Z'e e&ƒye e&j(ƒZ)Wn)ek rxZ*dEe*j+GHe,dFƒnXe-e'ƒdkr¥e&j. r¥e j/dGƒnee e&ƒee e&e'd>ƒe&j0ræe&j1dk rædHGHne&j2re&j1dkkrdIGHnde)kr3e&j1dkr3dJGHe,dFƒnidKe)kdL6dMe)kdN6dOe)kdP6dQe)kdR6dSe)kdT6dUe)kdV6dWe)kdX6dYe)kdZ6de)kd[6e&j0d36e&j3d\6e&j4d06e&j5d6e&j6 d]6e&j7d^6e&j8d_6e&j8d`kda6e&j2d66e&j9db6e&j.dc6e&j:dd6e&j;de6e&j<df6e&j=dg6e&j>dh6e&j?dC6e&j1d'6e&j@d@6ZAyee&jBdeAƒZCWne j/diƒnXgZDxe'D]ZEeDjFeEƒq°WyNe&j8d`krèejƒZGneeCeDeAƒe&j8d`kreeGƒnWn)ek r@Z*djGe*j+GHe,dFƒnXe,ƒdS(ls… This file contains the export database utility which allows users to export metadata for objects in a database and data for tables. iÿÿÿÿN(texport_databases(tparse_connectiont add_regexp(tsetup_common_options(tadd_skip_optionstcheck_skip_options(t add_verbositytcheck_verbosity(tadd_format_optiont add_rpl_mode(tadd_allt check_allt add_locking(t add_rpl_usertcheck_rpl_options(t UtilErrors MySQL Utilities - mysqldbexport s7mysqldbexport - export metadata and data from databasess7%prog --server=user:pass@host:port:socket db1, db2, db3tnamestbrieftfulltdatat definitionstbothcCsBtjƒ}t||dƒ}|dkr5d}nd|GHdS(sePrint the elapsed time to stdout (screen) start_test[in] The starting time of the test idiis Time: %6d N(ttimetint(t start_testt stop_testt display_time((s%..\utilities\scripts\mysqldbexport.pytprint_elapsed_time-s    isNdisplay the output in either sql (default), grid, tab, csv, or vertical formattsqls-ds --displaytactiontstoretdesttdisplaytdefaultthelps¬control the number of columns shown: 'brief' = minimal columns for object creation (default), 'full' = all columns, 'names' = only object names (not valid for --format=sql)ttypetchoicetchoicess-es--exporttexportscontrol the export of either 'data' = only the table data for the tables in the database list, 'definitions' = export only the definitions for the objects in the database list, or 'both' = export the metadata followed by the data (default: export definitions)s-bs --bulk-insertt store_truet bulk_imports3use bulk insert statements for data (default:False)s-hs --no-headerst no_headerss;do not display the column headers - ignored for grid formats --skip-blobst skip_blobssdo not export blob data.s--file-per-tablet file_per_tblsRwrite table data to separate files. Valid only for --export=data or --export=both.s-xs --excludetappendtexcludetstrings/exclude one or more objects from the operation using either a specific name (e.g. db1.t1), a LIKE pattern (e.g. db1.t% or db%.%) or a REGEXP search pattern. To use a REGEXP search pattern for all exclusions, you must also specify the --regexp option. Repeat the --exclude option for multiple exclusions.t databasess --skip-gtidt skip_gtids(skip creation of GTID_PURGED statements.s --comment-rplt comment_rplsUplace the replication statements in comment statements. Valid only with --rpl option.s ERROR: %sisaYou must specify at least one database to export or use the --all option to export all databases.s;# WARNING: --skip-blobs option ignored for metadata export.s?# WARNING: --file-per-table option ignored for metadata export.sNERROR: You cannot use --export=data and --skip-data when exporting table data.ttablest skip_tablestviewst skip_viewsttriggerst skip_triggerst procedurest skip_procst functionst skip_funcsteventst skip_eventstgrantst skip_grantst create_dbt skip_createt skip_datatformattsingletquiett verbosityitdebugtexclude_patternstallt use_regexptlockingtrpl_usertrpl_modetrpl_files5Server connection values invalid or cannot be parsed.sERROR:(RR(Ht__doc__tostsysRt mysql.utilities.command.dbexportRtmysql.utilities.common.optionsRRRRRRRRR R R R R Rtmysql.utilities.exceptionRtNAMEt DESCRIPTIONtUSAGEt_PERMITTED_DISPLAYt_PERMITTED_EXPORTSRtpathtbasenametargvtparsertTruet add_optiontFalsetNonet parse_argstopttargst skip_objectstskipsteterrmsgtexittlenRIterrorR*R&R+RCR)R R(RERFR-RJRKRLRMRNR1R0toptionstservert server_valuestdb_listtdbR,R(((s%..\utilities\scripts\mysqldbexport.pytsæ