Closed fingust closed 5 years ago
Same as in #14.
If the system doesn't reside on the sdcard the name of the loopbackdevice will not be correct determined.
You may change all occurences of ${LOOPBAK} referencing the loopback device/partitions to your needs. But be warned: Take a closer look to line 98 (sfdisk --dump ${SDCARD} | sfdisk --force ${LOOPBACK}) This is dangerous rubbish! Although I contributed some code to this script I can't recommend it anymore. It may work correct, but has some flaws.
The whole part of creating the destination partitions needs some rework. Maybe you take a look for another raspi backup solution on github.
Best wishes Dolorosus
@dolorosus what are you currently using as a backup solution?
I just recently checked several other scripts, and on top are: 1) Raspibackup (is able to do the same, but if you just need rsync into an image, it's greatly overblown, and it first creates rsync, then image out of it, while this one rsync directly into the image) 2) This one which also does roughly the same thing, yet it's more convoluted, and still needs to first create rsync, and then image from it
I think rpimage is brilliant in the way it fuses two different procedures into one, and I would rather see it, or release it, updated. But I have so many other little projects going on, and as it is, this still works for me, that I don't "need" it upgraded, so I don't know if I will be putting my hands on the code anytime soon
Silly me, I just peeked into your repository and it appears you already released a similar script! Studying the source right now
I have a freshly installed Raspbian Stretch Lite apart from installing git and enabling SSH. It's installed on a USB instead of a SD Card so I've changed the SDCARD variable on the top of the script to point to the rootfs partition of the USB, which is /dev/sda2.
I ran the script with the following command:
./bkup_rpimage.sh start -s 4000 -c /mnt/JetFlash16/rpi_stage_1.img
Script output:
I've tried to execute suggested methods of the "kernel still uses the old table" message, but with no luck. Anything else is beyond my knowledge at this point, so I would appreciate the help.