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

[ Enhancement ] Backup and restore from stream #403

Merged
merged 14 commits into from
Oct 26, 2021
Merged

[ Enhancement ] Backup and restore from stream #403

merged 14 commits into from
Oct 26, 2021

Conversation

davidducos
Copy link
Member

Initial implementation of stream backups

@davidducos davidducos linked an issue Sep 17, 2021 that may be closed by this pull request
@davidducos davidducos added this to the Release 0.11.3 milestone Sep 17, 2021
@davidducos
Copy link
Member Author

This is an example of how you can execute mydumper and myloader using stream:

root@ubuntu-focal:~/stream/mydumper# rm -rf backup/ backup2/* ; ./mydumper -o backup -G -R -L log -v 4 -B test --stream --no-delete | ./myloader -d backup2 -o -B test2 -v 4 --stream --no-delete; ls backup backup2
** Message: 14:40:20.422: Step 1 completed, Databases created
** Message: 14:40:20.427: Step 1 completed, databases created
** Message: 14:40:20.445: Step 2 completed, tables created
** Message: 14:40:20.490: Thread 2 restoring table `test2`.`perftest` from backup2/test.perftest-schema.sql
** Message: 14:40:20.490: Dropping table or view (if exists) `test2`.`perftest`
** Message: 14:40:20.516: Creating table `test2`.`perftest` from backup2/test.perftest-schema.sql
** Message: 14:40:20.520: Step 3 completed, load data finished
** Message: 14:40:20.763: Thread 4 restoring `test2`.`perftest` part 0 of 0 from test.perftest.00000.sql. Progress 1 of 1 .
** Message: 14:40:20.763: Thread 1 ending
** Message: 14:40:20.763: Thread 3 ending
** Message: 14:40:20.763: Thread 2 ending
** Message: 14:40:22.234: Thread 4 ending
** Message: 14:40:22.234: Step 4 completed
** Message: 14:40:22.234: Import timings:
** Message: 14:40:22.234: Data      	| Index    	| Total   	| Table
** Message: 14:40:22.234: Step 5 started
** Message: 14:40:22.234: Starting table checksum verification
backup:
metadata  test-schema-create.sql  test.perftest-schema.sql  test.perftest.00000.sql  test.perftest.metadata

backup2:
metadata  test-schema-create.sql  test.perftest-schema.sql  test.perftest.00000.sql  test.perftest.metadata

@breisig
Copy link

breisig commented Oct 18, 2021

Will this get merged anytime soon for stream support?

@davidducos
Copy link
Member Author

davidducos commented Oct 18, 2021

Hi @breisig ,
I expect to be released in v0.11.3 which is planned to mid-Nov but I hope this will be merge this week to master.
Take into account that you can test branch stream, as latest commit fix several issues.

@davidducos davidducos merged commit bfe9c43 into master Oct 26, 2021
@davidducos
Copy link
Member Author

If you use nc, you might need to use -N on the sender side to send the EOF, if not, it might be possible that the connection stay up.

@davidducos davidducos deleted the stream branch November 9, 2021 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Empty database is not created Could MyDumper support stream backup and loader?
3 participants