Skip to content

Disjoin backup methods from dump methods in WpcliSqlAdapter #467

Closed
@alessandro-fazzi

Description

@alessandro-fazzi

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions