Aside from using BOD and power monitor circuits there are some things the embedded systems do to help mitigate abrupt power loss situations:
- Read Only File Systems
- This means that the file system cannot be corrupted because it is marked explicitly read-only. There may be data that is written to some logs stored in a different partition and some of the other techniques help protect that data.
- Disable write-caching
- Mostly used in desktop systems, write caching delays file system writes to a later time when there is a block of data to be written. Disabling this helps make sure that a power-out doesn't miss a cached write.
- Picking the right disk file system
- File systems like ext4, yaffs, and ubifs are specifically designed to work well in unreliable systems (although ubifs supports write caching).
- File System Partitioning
- Having a read-only partition that contains the kernel and critical programs and another partition that is read/write for non-critical data is a common method.
- Having full backup copies of the kernel, rootfs, and data partitions.
- Storing recovery OS on another partition
- This is used in conjunction with file-system checking on start up. Some file systems run through a check during boot that determines if the partition is damaged or not. The boot system can use this to change to a backup.
- Avoid storing critical data in memory, write it to storage as quickly as possible.
There are many other ways to help, but it should be noted that Raspbian is not a ruggedized system, just like the out-of-the-box Beaglebone or other "toy" embedded SOC "computers". These are meant to get a basic user up and running as quickly as possible, not to provide them with an industrial solution.
If you want to read more about backup/restoration software, I highly recommend SBabic's swupdate tool, it is extremely well documented and from a high-level goes through different schemes that industrial customers use to partition, backup, restore, and recover.