Magento 2 Database Cleanup with Retention Periods and Dry Run
SKU: DBTABLECLEANUP1
- tidy up log, report and session tables with periods
- dry run shows rows and storage in advance
- delete in batches, business data locked
- schedule via cron, log and permissions in the admin
Einmaliger Kauf · inkl. 12 Monate Updates · zzgl. MwSt.
Magento 2 Database Cleanup: tidy up log, report and session tables
With the Mironsoft Magento 2 Database Cleanup you keep technical tables lean that grow with every visit: visitor logs, report indexes, cron entries, admin sessions and old search queries. Each table gets a retention period, a dry run shows the number of affected rows in advance, and deletion happens in small batches that do not block the shop. Orders, customers and catalog data are explicitly excluded.
Approved tables
Only a fixed list of technical tables can be selected, sales and customer data are locked.
Retention period
For each table you set in days how long entries stay before they are deleted.
Dry run
A preview shows in advance how many rows and how much storage would be freed per table.
Delete in batches
Deletion runs in small steps with pauses so that locks and replication lag do not occur.
Schedule via cron
Runs at night or on weekends, with a limit for runtime and row count.
Log and permissions
Every run is logged with row counts, the ACL controls preview, start and settings.
Why a Magento 2 Database Cleanup saves storage and speed
With every visit, every product view and every cron run Magento writes rows into technical tables. After a year, visitor logs and report tables often hold millions of entries that nobody evaluates any more. That lengthens backups, bloats their size and slows down queries that touch these tables. The built-in cleaning jobs cover only a part.
A Magento 2 Database Cleanup tidies up exactly where it is safe and leaves everything else untouched. You define the periods, see the effect in advance and keep a log. The database stays small without anyone running SQL commands by hand.
Magento 2 Database Cleanup: choose tables and set retention periods
The list of the Magento 2 Database Cleanup shows the approved tables with current row count and size. For each table you set the retention period, for example ninety days for visitor data or thirty for sessions. Which table may keep data for how long also depends on your data protection periods, the legal review is up to the shop operator. Tables that are not activated are never touched.
- Row count and size per table visible
- Period in days per table
- Only explicitly activated tables
Preview before deleting: rows and storage per table
The dry run counts which rows have exceeded the period and estimates the storage that would be freed. Nothing is deleted. You see the numbers per table and can decide whether the periods fit. At the first Magento 2 Database Cleanup the preview often shows surprisingly large amounts, which can be removed in stages.
- Count and storage estimate without deleting
- Numbers per table at a glance
- Deletion in stages possible
Gentle deletion: batches, pauses and runtime limit
Large deletions at once block tables and burden replication. That is why the Magento 2 Database Cleanup works in batches of a few thousand rows with a short pause in between. A runtime limit ends the job cleanly even if rows remain. The next run continues there. The database stays usable for the shop meanwhile.
- Batch size and pause adjustable
- Runtime limit per run
- Next run continues
Schedule, log and permissions for controlled operation
Via cron you decide when the Magento 2 Database Cleanup runs, for example Sundays at three in the morning. Every run appears in the log with table, deleted rows and duration. Errors trigger an email to the tech team. The ACL separates viewing, preview and start so that not everyone on the team may delete. The run can also be started with a console command.
- Schedule via cron
- Log with rows and duration
- ACL separate for preview and start
Where the Magento 2 Database Cleanup helps in daily work
Typical situations in which lean tables save time and money.
Backup takes too long
The backup grows from week to week. After a Magento 2 Database Cleanup the database shrinks and the backup runs through much faster.
Slow reports and queries
Report tables with millions of rows slow down evaluations. With retention periods they stay small and respond quickly again.
Moving to a smaller hosting plan
Before a move or a capacity limit you clear technical leftovers without touching business data.
Data protection and retention periods
Visitor data should not sit around indefinitely. Fixed periods make this traceable, the review stays with the shop operator.
Magento 2 Database Cleanup: without and with the module
The difference to manual SQL commands and the standard jobs.
| Topic | Without the module | With Mironsoft DB Table Cleanup |
|---|---|---|
| Scope | Only a few standard jobs | Several technical tables with periods |
| Preview | None | Dry run with rows and storage |
| Safety | A SQL error deletes the wrong data | Fixed list, business data locked |
| Load | Large deletions block | Batches with pauses |
| Evidence | None | Log per run |
How we set up the Magento 2 Database Cleanup for you
The process after your order.
Assessment
We look at your largest technical tables and discuss which periods fit your operation.
Installation
We install the module, activate the chosen tables and set up the Magento 2 Database Cleanup with batch size and pause.
Dry run
We run only previews first and check the numbers with you before anything is deleted.
First run
We start the deletion in stages under observation, with a fresh backup beforehand.
Handover
Your team receives the schedule, the log and an introduction to the settings.
Scope compared with the standard log cleaning and the action log
Magento ships a log cleaning for some visitor and log tables that you switch on in the configuration. It covers neither all report tables nor cron entries or sessions and offers no dry run. The Magento 2 Database Cleanup adds periods per table, a preview and a log to this function.
The Mironsoft admin action log documents changes by users and is not emptied automatically. All modules can be combined, and the interface needs no additional JavaScript library.
No download, but a personal setup
The Magento 2 Database Cleanup is not listed here as a finished download file for self-installation. The purchase is a commission: we contact you after the purchase, install the module in your shop and agree tables, periods and schedule with you.
Frequently asked questions
Everything important about tables, periods, safety and how the purchase works.
How can I clean the database in Magento 2?
Which tables can be cleaned?
Are orders or customers deleted?
Can I see in advance what will be deleted?
Does the deletion block my shop?
How often should I clean up?
Does the Magento 2 Database Cleanup work with Hyvä?
Do I need a backup beforehand?
How does it differ from the standard log cleaning?
Can I download and install the module myself?
Magento 2 Database Cleanup – Mironsoft DB Table Cleanup