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

Disjoin backup methods from dump methods in WpcliSqlAdapter #467

Closed
alessandro-fazzi opened this issue Apr 16, 2018 · 1 comment
Closed

Comments

@alessandro-fazzi
Copy link
Member

alessandro-fazzi commented Apr 16, 2018

Actually WpcliSqlAdapter#backup_remote_db! and WpcliSqlAdapter#backup_local_db! methods both relies on Deployer::Base#mysql_dump_command.

This became a blocker to other features such as #442.

Moreover because introducing selective tables dumping on mysqldump would bring ATM to a partial backup, which could be unexpected behaviour. E.g:

  • I've a feature to push only the wp_posts table
  • I configure this feature on both local and production
  • I do a push
  • wordmove will backup the remote DB using mysqldump command and thus will dump only wp_posts table
  • I have an incomplete backup

It's true that we will change only that table and we have its backup, but it's also true that if something go really wrong during db operations, I must have the possibility to restore a complete snapshot of my data.

I'd like that mentioned backup methods will rely on wp db export command.

Other dump operations will remain the same at least ATM.

Notes:

  1. to call wp from inside our code is slow; I mean: SLOW! But it's affordable, standard, responsibility-free, future proof, configurable, double rainbow.
  2. starting from v3 we declared wp-cli as a dependancy; so we are on the right path
  3. This is a blocker for the implementation I've planned in Possibility to limit push & pull to $prefix tables ? #442
@alessandro-fazzi
Copy link
Member Author

This is accomplished into the current 6.0.0.alpha version. #624

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant