A shell script cobbled together from various bits and pieces is a closer description. Uglier than homemade sin and I've only tested it on one device where it seemed to be working until the WiFi shut off.
There was an recent thread
Can you create a micro SD card image without taking apart your Kobo? based on a script from 2015 that was run from KOReader.
Basically, kludge the shutdown processes from the KOReader script, unmount and remount the partitions as R/O and copy the data (latter two courtesy of geek1011).