-
Notifications
You must be signed in to change notification settings - Fork 440
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
Could MyDumper support stream backup and loader? #100
Comments
Hi @leafonsword , I got that question often :) it won't be easy as how mydumper actually works, it will need some refactoring, i.e. the order in which diff objects are dumper, at the moment we first do data then schema so we need to swap that, and for sure there are other considerations. The only I can tell at this time, is that I will review the effort on this and see if I can have the time to develop it. Thanks for the feedback! |
+1 here 😄 |
+1 need this |
@maxbube Even without switching |
any update ? |
Hello @Esysteme, At this moment there is no plan to implement it. I know that it is a really useful feature, but we need to consider a writer/reader object which must be handling a queue, for writes in mydumper is simpler, but for myloader it is not, as we need to stop reading from the queue when a CREATE TABLE arrives to avoid issues in the next INSERTs. |
I'm answering to my self, we can use mysql comments that can be parsed by myloader to "send commands", so it will be able to know when a stage finished to start with the next stage. |
We can use:
to get the thread id, as I was thinking to implement this on function write_data and as write_data can be called several times before a file is close, we need to identify the write_data per thread. When write_data is called and streaming is being used, we are going to be enqueuing, not just the statement, it will be the thread_id Another consideration is that there will be a new thread which is going to be reading from the |
I already have a version of mydumper.c which serialize the export to the stdout. I'm going to start working on the myloader.c now... |
Hi All, I'm still working on this solution, as I'm still not sure how to implement it. I learned a lot on what I did on mid-April, but it was going to be very difficult to maintain during the time. I'm still thinking in the best solution. |
Finally, I reached to a conclusion. When we use --stream, the files are going to be created locally and they will be also streamed, by default, they will be deleted after transferred had completed. We only need to add a stream thread that will receive file names which are going to be streamed. verbose option will be only available if -L is set. myloader will implement a thread to read the stream and creates the file locally. It will have the same 2 options: We need to consider if --stream and --no-delete is used, the connection to the database might not be needed, as the user might want to expand the backup files only. |
Would be nice if we can stream directly into mysql without the need to create the files... It seems all files are completed before import begins |
Hi @cyford, |
Sometimes we need backup to stream and load from stream so that backup is less, could MyDumper support stream backup and loader?
The text was updated successfully, but these errors were encountered: