Skip to content

Stripped Database Dumps

cmuench edited this page Nov 17, 2012 · 12 revisions

Stripped Database Dump

Dumps your database and excludes some tables. This is useful i.e. for development.

Separate each table to strip by a space. You can use wildcards like * and ? in the table names to strip multiple tables. In addition you can specify pre-defined table groups, that start with an @ Example: "dataflow_batch_export unimportant_module_* @log

$ n98-magerun.phar database:dump --strip="@stripped"

Available Table Groups:

  • @log Log tables
  • @dataflowtemp Temporary tables of the dataflow import/export tool
  • @stripped Standard definition for a stripped dump (logs and dataflow)
  • @sales Sales data (orders, invoices, creditmemos etc)
  • @customers Customer data
  • @trade Current trade data (customers and orders). You usally do not want those in developer systems.
  • @development Removes logs and trade data so developers do not have to work with real customer data

Add your own groups

You can extend or modify the groups by createing your own config ~/.n98-magerun.yaml or project specific in app/etc/n98-magerun.yaml file.

Example:

commands:
  N98\Magento\Command\Database\DumpCommand:
    table-groups:
      - id: n98
        description: Tables starting with n98
        tables: n98*
      - id: development
        description: Removes logs and trade data so developers do not have to work with real customer data
        tables: @trade @stripped @n98
Clone this wiki locally