-
Notifications
You must be signed in to change notification settings - Fork 28
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
Adds file splitting support to dump/backup commands #50
Adds file splitting support to dump/backup commands #50
Conversation
afdeb8c
to
284fef1
Compare
a04492a
to
1d51ff0
Compare
Might change how we are handling file splitting, so setting this as See ManageIQ/manageiq#17798 (comment) for some further details. |
1d51ff0
to
68db4a9
Compare
@@ -147,6 +148,12 @@ def ask_for_tables_to_exclude_in_dump | |||
end || true | |||
end | |||
|
|||
def ask_to_split_up_output | |||
if action != :restore && should_split_output? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should only support this for the :dump
action on the first pass since restore from split backups won't work and it wasn't really part of the original RFE.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since restore from split backups won't work
Neither restoring from :dump
or :backup
is supported with splits currently, since there is no way to fetch the splits (via a glob) and combine them into a single stream.
Adding support for restoring from a split would be a separate RFE, but it would effectively be the same work to do it for both as it would be for one. They basically would need some form of a pipeline to first take the files in order and read their data in order as if they were a single stream.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess what I'm saying is that we shouldn't give the user the option to backup using splits if we can't restore with splits. I'm fine with the option to dump using splits because the intention was never to restore it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess what I'm saying is that we shouldn't give the user the option to backup using splits if we can't restore with splits.
I guess that is fair.
I figured that someone would eventually request the splitting functionality for backups as well anyway, specifically for s3
, since there limits to file size.
Please note that I am also partially arguing this point simply because I don't want to delete the appliance console integration tests that I have written that already support running against and validating split based backups...
(deep down... I am really a simple human being really...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely not arguing against creating split backups at some point, but I think we need split restore at that point as well. If we leave this as is, some user will be rather unhappy when we have to tell them that they can't restore a backup that we let them create.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welp, I can do that. Despite not wanting to comment out/remove some of my personal tests, I think I agree with that line of thinking.
Will try and take care of that code change shortly.
Adds a set of questions to be queried for `:dump` and `:restore` actions in DatabaseAdmin. It asks: - If the wishes to split up the output of the dump/restore - If yes, how big should the split files be (default 500M)
68db4a9
to
b7ab9cb
Compare
Checked commits NickLaMuro/manageiq-appliance_console@2f084da~...b7ab9cb with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 spec/database_admin_spec.rb
|
NOTE: Currently built off of #51Update: This has been rebased and this branch updated accordingly.This exposes the
:byte_count
flag that is added to theevm:db:backup
andevm:db:dump
tasks here:The user experience will look something like the following:
Links