Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySQL: Add support for executing multiple dump commands #41

Open
hmsayem opened this issue Nov 13, 2024 · 0 comments
Open

MySQL: Add support for executing multiple dump commands #41

hmsayem opened this issue Nov 13, 2024 · 0 comments
Assignees

Comments

@hmsayem
Copy link
Member

hmsayem commented Nov 13, 2024

rootCmd.Flags().StringVar(&multiDumpArgs, "multi-dump-args", "[]", "Specify a JSON array of mysqldump argument sets")
var argsList []string
err := json.Unmarshal([]byte(dumpArgs), &argsList)
if err != nil {
	fmt.Println("Error parsing JSON:", err)
	return
}

for _, args := range argsList {
	fmt.Println("mysqldump", args)
}
--multi-dump-args='["--no-tablespaces --no-create-info --skip-triggers", "--no-tablespaces --ignore-table=db.table1,db.table2", "--no-create-info --no-tablespaces"]'
@hmsayem hmsayem changed the title Add flag for executing multiple dump commands MySQL: Add flag for executing multiple dump commands Nov 13, 2024
@hmsayem hmsayem changed the title MySQL: Add flag for executing multiple dump commands MySQL: Add support for executing multiple dump commands Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants