welaika / wordmove

Multi-stage command line deploy/mirroring and task runner for Wordpress
https://wptools.it/wordmove
MIT License
1.87k stars 167 forks source link

Disjoin backup methods from dump methods in WpcliSqlAdapter #467

Closed alessandro-fazzi closed 2 years ago

alessandro-fazzi commented 6 years ago

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:

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 #442
alessandro-fazzi commented 2 years ago

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