I am seriously struggling to get a decent backup to restore to my dev environment.

is there such a thing as a script which backs up a part of the database for this purpose?

for instance, I know i need the products and the variants, but i don't need to get any of the visitor logs tables.

Is there a script that gets say the first 30 required items from the tables that are absolutely required and skips the stuff that isnt?


2 Answers 2


There is a function in n98-magerun that allows for developer backups that allows removal of several table groups from the backup. If the table groups don't include a table you want ignored, you can also list the tables out in an ignore list that may also include the predefined group.

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

It is a github hosted project (n98-magerun) which Alan Storm has featured in a book called No Frills Command Line Magento


We published a set of "tools" in this repo: magendoo-shell

The one that should fit your requirements in backup.sh. You can also adjust it to ignore additional tables and so on.

  • yeah, that looks like it could do a good job. will test it out in the next few days. will mark it as answer if nobody else has any offers...
    – bytejunkie
    Aug 29, 2013 at 20:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.