add_skip_options(parser) # Add verbosity and quiet (silent) mode add_verbosity(parser, True) # Add engine options add_engines(parser) # Add locking options add_locking(parser) # Add regexp add_regexp(parser) # Replication user and password add_rpl_user(parser, None) # Add replication options but don't include 'both' add_rpl_mode(parser, False, False) # Now we process the rest of the arguments. opt, args = parser.parse_args() try: skips = check_skip_options(opt.skip_objects) except UtilError, e: print "ERROR: %s" % e.errmsg exit(1) # Fail if no options listed. if opt.destination is None:
# Connection information for the destination server parser.add_option( "--slave", action="store", dest="slave", type="string", default=None, help="connection information for slave server in the " "form: <user>[:<password>]@<host>[:<port>]" "[:<socket>] or <login-path>[:<port>][:<socket>]" " or <config-path>[<[group]>].", ) # Replication user and password add_rpl_user(parser) # Pedantic mode for failing if storage engines differ parser.add_option( "-p", "--pedantic", action="store_true", default=False, dest="pedantic", help="fail if storage engines differ " "among master and slave.", ) # Test replication option parser.add_option( "--test-db", action="store",
add_all(parser, "databases") # Add the skip common options add_skip_options(parser) # Add verbosity and quiet (silent) mode add_verbosity(parser, True) # Add regexp add_regexp(parser) # Add locking add_locking(parser) # Replication user and password add_rpl_user(parser, None) # Add replication options add_rpl_mode(parser) # Add comment replication output parser.add_option("--comment-rpl", action="store_true", default=False, dest="comment_rpl", help="place the replication statements " "in comment statements. Valid only with --rpl option.") # Now we process the rest of the arguments. opt, args = parser.parse_args()
# Connection information for the masters servers parser.add_option("--masters", action="store", dest="masters", type="string", default=None, help="connection " "information for master servers in the form: " "<user>[:<password>]@<host>[:<port>][:<socket>] or " "<login-path>[:<port>][:<socket>]" " or <config-path>[<[group]>]. List multiple master " "in comma-separated list.") # Replication user and password add_rpl_user(parser) # Add start from beginning option parser.add_option("-b", "--start-from-beginning", action="store_true", default=False, dest="from_beginning", help="start replication from the first event recorded " "in the binary logging of the masters.") # Add report values parser.add_option("--report-values", action="store", dest="report_values", type="string",