Customize database dump for development

Sometimes it’s useful to dump a production database and import them on a local developer workstation.
In this case we have some issue to solve.

Legal Issues

A production database contains many critical privacy data like customer addresses, email, hashed password, orders
which can produce big trouble if a hacker or someone can access it.
For a development workstation it’s a good advice to exclude the data. In most cases a developer needs no customer data
to create a new module.

Log data

Magento produces many log data. Some tables grow up and can contain many millions of records.
An import of a database could run up to hours. This is unpractical and unwanted for development.

n98-magerun strip option

n98-magerun can help you. The database command comes with a handy strip option.
If you run n98-magerun with –help option you can see this:

(more…)

Introducting the new n98-magerun module system

Since version 1.72.0 n98-magerun offers you a new possibility to share your commands and configuration. Modules can be created in a easy way.
In the past it was hard to share own commands within a developer team. Every team member must manually add configuration to a config file.
Now it’s possible to manage the configuration in a single file inside the module which can be updates by a VCS like SVN or GIT.

Module Structure

A module in the simplest form exists as a single folder with a config file which must be named n98-magerun.yaml.
The config file must be placed directly in the module folder. If you have created some commands in the past you will see that the confiuguration
format is nearly the same. Nothing really new. The new big thing is that n98-magerun will search automatically for modules in some defined basse folders and merges all found config files.

(more…)