CM3 eMMC backup

I have a CM3 with 8GB eMMC running BalenaOS.
How to backup a Compute Module 3 Plus eMMC to a .img file in an external USB stick to be reuse as backup?
Is this possible?

Thanks

I am not aware of any process to do this; but I would say that this wouldn’t be anything balenaOS specific. Programs like Etcher can write any raw disk image to a block device, so if you can boot the CM3 from a disk which isn’t the eMMC then you could, in theory at least, dd the whole eMMC device to a .img file.

@richbayliss

Thank you for response.

I am not familiar with dd.
Can you give me a example how to apply this command in this specific case?

Thanks

Hi, this doesn’t seem that simple to achieve as essentially you would have to run dd for each partition. You can see the image partition layout we use here: https://www.balena.io/docs/reference/OS/overview/2.x/#image-partition-layout.

Expanding on this, though, assuming you haven’t modified the root filesystem everything other than the data partition is already on the img files that balena releases so you can just use these and then use a backup to recover the user data if required?

As for backing up the user data there are several alternate methods such as those discussed here: Backup Docker Volumes.

Thanks @garethtdavies, @richbayliss. :+1: