Skip to content

Instantly share code, notes, and snippets.

@paales
Last active August 22, 2024 16:56
Show Gist options
  • Save paales/8229883 to your computer and use it in GitHub Desktop.
Save paales/8229883 to your computer and use it in GitHub Desktop.
Export a Magento database without the products or without the categories, place this file in app/etc/. Docs about creating a custom dump command: https://github.com/netz98/n98-magerun/wiki/Stripped-Database-Dumps
commands:
N98\Magento\Command\Database\DumpCommand:
table-groups:
- id: products
description: Skip all product tables.
tables: >
catalog_category_product*
catalog_compare_item
catalog_product_*
cataloginventory_stock_*
catalogrule_affected_product
catalogrule_product*
catalogsearch_*
- id: categories
description: Skip all category tables.
tables: >
catalog_category_*
@tegansnyder
Copy link

@PAALS I submitted a pull request for this as I think it would be a good core addition to n98-magerun: netz98/n98-magerun#286

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment