wp-cli / db-command

Performs basic database operations using credentials stored in wp-config.php.
MIT License
71 stars 58 forks source link

Feature request: Database export in long format (individual INSERT lines) for easier DIFFs #177

Closed rmpel closed 3 years ago

rmpel commented 4 years ago

I'd like to request a feature, as the title already states

I am contemplating a script that creates a backup of the database, then DIFFs it against the previous backup and keeps only the diff and the last backup. This way we have a reference of changes without over-filling the harddisk

(of course, we could use GIT to accomplish this as well, but even then the feature request stays the same)

The request is to export the database using the long format, with individual INSERT INTO statements for each record. I understand this will increase the size of the export by 2 or even 3 fold, but otherwise, a DIFF (or GIT commit) is essentially a total table content per change, instead of a record change.

Thank you for your time :)

Remon.

wojsmol commented 4 years ago

Hi Try wp db export --skip-extended-insert

rmpel commented 4 years ago

Awesome!

I'd like to change my feature request to "please add that to the documentation and --help output"

https://developer.wordpress.org/cli/commands/db/export/

Thank you for the swift response 👍