Skip to content

Commit

Permalink
Merge branch 'master' into mariadb-dump
Browse files Browse the repository at this point in the history
  • Loading branch information
dveeden authored Nov 8, 2024
2 parents aba79bf + 867d4cc commit 9321af1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions cmd/go-mysqldump/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ var (
execution = flag.String("exec", "", "mysqldump/mariadb-dump execution path")
output = flag.String("o", "", "dump output, empty for stdout")

dbs = flag.String("dbs", "", "dump databases, separated by comma")
tables = flag.String("tables", "", "dump tables, separated by comma, will overwrite dbs")
tableDB = flag.String("table_db", "", "database for dump tables")
ignoreTables = flag.String("ignore_tables", "", "ignore tables, must be database.table format, separated by comma")
dbs = flag.String("dbs", "", "dump databases, separated by comma")
tables = flag.String("tables", "", "dump tables, separated by comma, will overwrite dbs")
tableDB = flag.String("table_db", "", "database for dump tables")
ignoreTables = flag.String("ignore_tables", "", "ignore tables, must be database.table format, separated by comma")
skipBinlogPos = flag.Bool("skip-binlog-pos", false, "skip fetching binlog position via --master-data/--source-data")
)

func main() {
Expand All @@ -33,6 +34,8 @@ func main() {
os.Exit(1)
}

d.SkipMasterData(*skipBinlogPos)

if len(*ignoreTables) > 0 {
subs := strings.Split(*ignoreTables, ",")
for _, sub := range subs {
Expand Down

0 comments on commit 9321af1

Please sign in to comment.