Has anyone built a solution to do a partition backup of the osmc OS which could be saved to /sda1 for example, and from which a previous image could be easily restored?
Right now i remove sdcard, plug it into my windows pc and use a program called w32 copier (or something like that), but moving a card in and out of pi isn’t ideal.
I’m on Noobs, which i think boots up before osmc, and unless shift is pushed the pases the baton so to speak onto osmc. I seem to remember that when i got my wdpidrive that it came with some software (maybe like a dual boot) type of solution which if memory serves allows block level backup and restoration.
I don’t suppose there is a way of doing this with osmc, as it probably can’t do a block level backup of itself when running.
presumably the file name created will be something like mmcblk06.img?
Do you think i could put this in the bootloader so there is an option of pushing shift during startup and choosing this image file as the one to restore from? That would be slick-as!
This will overwrite your wdpidrive completely, I don’t think this is what you want, or?
Also are you doing this from within OSMC or any of the other NOOBS OS you have installed? If you do it from within OSMC you will not be able to unmount /dev/mmcblk06
I did not want to overwrite my pidrive. That would be bad.
Two questions:
If I create a dir in sda1, would this work, for example; ‘dd if=/dev/mmcblk06 of=/dev/sda1/images_** bs=64K conv=noerror,sync’ I assume dd doesn’t require a ‘twin’ partition on my pidrive to work, and that directing dd to a dir would be sufficient
If I entered recovery mode would this allow my access to the osmc partion and then run the dd command
I seem to remember my pidrive came with software what would create a disk / partition image, however this is long gone and I can’t remember what is was. Could I replace by current recovery partition software with an alternative which has a gui for image backup / restoration?
Since a file system partition should be backup while it’s not running. So you stuck doing it on pc as you have done.
If you don’t want to move the SD card you need:
Even better, you can run OSMC from the USB you just copied to and use the SD card as a backup.
Get UUID then change /dev/ mmcblk0p6 to /dev/ UUID=value(no quote) in commandline.txt
I really wouldn’t use rsync to create a full backup of a partition as it stores only the files, not the partition table. If you tried to restore that to a different SD card it wouldn’t necesarily work. rsync is great for backing up files, but it is not an imaging tool, it is essentially just a wrapper for cp.
The fact that the OP’s OSMC partition is mmcblk06 rather than mmcblk02means that he is working on a multi-boot system, so he can just boot to a different OS and run from the unmounted partition.