The Web is Ableist… But there are about to be repercussions for this.
In June 2025, the European Accessibility Act (2025) comes into effect, and e-commerce businesses need to be ready.
Using sed to quickly get the contents of a single table from a database backup.
When working with huge databases it can sometimes take an age to restore a complete backup. This is a real pain when working locally when you just need a fraction of the data, especially if you have the patience of a developer!
As an example, sometimes it's really useful to get the contents of core_config_data table from a Magento site to see exactly what has changed in configuration on live without needing to import in huge amounts of pointless data.
We can use Linux's built in sed command to grab just the right content in a MySQL dump without any of the extra bits.
This all works as standard MySQL dumps always have the same structure for each table. Here's a quick example:
Let's break this down quickly.
Our sed command defines the start and end point for the data we want as the drop and the unlock. You could change this around for lots of use cases, like other tables, or just getting the structure of a table.