You have one big --all-databases dump and only the blog database is broken. Cutting the file apart with sed is no fun, and the client can do the filtering for you.
mariadb -e 'CREATE DATABASE IF NOT EXISTS blog'
mariadb --one-database blog < all.sql
The short form is -o. The client starts in blog and skips every statement that runs while another database is selected. Because a full dump has a USE line before each database, only the blog part gets executed. A row changed in another database before the restore stays changed afterwards.
The filter is simple, and the docs say so: it only follows USE statements. A statement that names another database directly, like UPDATE shop.orders ..., still runs while blog is the current database. Normal dumps do not write statements like that, but views, triggers or hand-edited SQL can.
So I’d try this on a scratch server or a copy first. It is a restore, and it will overwrite whatever is in blog right now, because the dump drops and recreates each table. The same option exists in the MySQL mysql client.
Further reading: mariadb command-line client options