Backup images of Pi using CustomPiOS-little help!

I think the ability to create a back up image of your pi after everything is set up (macros, plugins, etc) is worthwhile. I am attempting a backup of my Pi that has Jeffeb3’s Octopi/Cncjs image on it.

I followed Guy’s instructions to create an image that is both created and stored on my Pi, and it worked, sorta.

I loaded CustomPiOS as the “pi” user which put it in /home/pi/CustomPiOS/. I have not burned the resulting image yet but when peeking into the image with 7zip, it doesn’t appear to contain Octopi or Cncjs.

Should I have loaded CustomPiOS into the root directory as the root user? Below are the commands I sent(image directory is <OctiCNC>):

sudo apt-get update
sudo apt-get install gawk util-linux realpath qemu-user-static p7zip-full git --fix-missing
git clone
cd CustomPiOS/src
./make_custom_pi_os -g OctiCNC
cd OctiCNC/src
sudo modprobe loop
sudo bash -x ./build_dist

So, there is some confusion here.

CustomPIOS creates a “fresh” image based on the configuration in a bunch of scripts. If you wamt octoprint installed, you need a script that installs it. If you would like to create that fresh image on a pi, then you followed the right instructions.

What you really want is to make an image from your configured pi. To do that, you want to turn off the pi and put the sd card into another computer and copy it to an image. I would use dd for this and my other computer would be linux. I don’t know if etcher can do that operation. Be advised that this is not the same as a fresh image from CustomPiOS. The CustomPiOS does things like expand the file system and create unique keys. Copying the image just makes a copy. If you give that image to the internet, they have the keys for your pi.

There’s more than just “some” confusion! Your grasp of this FAR exceeds mine.

In spite of all my going around my elbow to scratch my backside, you gleaned my real goal and told me how to do it. Thank you!

By the way, a single pi zero seems to lack enough speed/memory/buffer or something to run nc programs on BOTH octopi and CNCjs simultaneously. Got a Pi3 b coming Monday.

1 Like

I use linux for all my comouters and I have for 10+ years. So just don’t ask me about windows :slight_smile:

Yeah, the zero is fun, but at $35 a bigger pi is just worth it. It can run one printer without a camera fine, but I do see a speed boost with the 3B even with a minimal setup. I haven’t done extensive testing on the cnc.js plugins either and I wouldn’t be surprised if some of them were also resource hogs. I also appreciate the ethernet and multiple USB ports on the big pi.

After Jeffeb3 turned on my lightbulb, I looked into this a bit. Making the backup image of my configured pi is actually very simple with Win32DiskImager which is what I use to burn images to SD cards. Power down your Pi and remove the SD card. Then insert the SD card into your PC. In the “Image File” box, you type the path to and name of the file you want to make,(eg C:\Users\hello\Desktop\backup.img). In the “Device” box, select the drive you want to clone, then click “Read.” Keep the resulting image file in a safe place and if ever need be, you can burn that image back to an SD card and restore your Pi. Reiterating Jeffeb3’s warning, the image file of your pi should be kept private. If you share it, you are sharing your network access and root access to your pi.

And your private ssh keys, which even after you change your root password, someone could log in using those keys, I believe.