Create backup (img) with image-backup

Followed the recommendation to install Anthias via
Install Anthias on a Raspberry Pi running Raspberry Pi OS Lite (Bookworm): https://github.com/Screenly/Anthias/blob/master/docs/installation-options.md#installing-on-raspberry-pi-os-lite-or-debian
successfully. The manual installation takes some steps and time, so:

Now I would like to create a backup of the SD-card via

Wondering how I could stop Anthias before running image-backup since Anthias is using docker?
…and restarting Anthias after the backup again?

Thanks, Martin

Hello @Martin,

Yes, it’s possible to stop Anthias before you do a backup.

After SSH-ing into your device, you could run the following commands:

cd ~/screenly
docker compose down

After that, you can start backing up.

When you’re done, you can run the following:

cd ~/screenly
./bin/upgrade_containers.sh

Please take note that running upgrade_containers.sh will try to pull the latest changes from Docker Hub.

If you want to just start the containers again, you can modify upgrade_containers.sh and temporarily comment the following lines before you run the script:

sudo -E docker compose \
    -f /home/${USER}/screenly/docker-compose.yml \
    ${MODE}

I hope it helps. Please let me know if you need any help.

Hi @nicomiguelino,

great - many thanks!

I’ve installed image-backup for raspberrypi from RonR via the following installation procedure:

download “RonR” image-backup from “seamusdemora” github https://github.com/seamusdemora/RonR-RPi-image-utils
repo (which seems to be the most updated) (and give execution permission)

sudo mkdir ~/bin

cd ~/bin

sudo wget https://raw.githubusercontent.com/seamusdemora/RonR-RPi-image-utils/master/image-backup

sudo chmod +x image-backup

The backup is going to USB Stick connected to the raspberry pi: must be NTFS formatted for files > 4GB !

lsusbinformation about the USB devices connected to your system, including the bus number, device number, vendor ID, product ID, device class, subclass, and protocol

lsblk … lists information about all available or the specified block devices

sudo fdisk -l /dev/sda … list partition details of USB drive

mount USB Stick:

sudo mkdir /media/usb

sudo mount /dev/sda1 /media/usb (see partition details above)

backup to USB:

stop docker:

cd ~/screenly

docker compose down

initial backup:

sudo ~/bin/image-backup --initial /media/usb/backup.img,10000

incremental backup:

sudo ~/bin/image-backup /media/usb/backup.img

Start docker:

cd ~/screenly

./bin/upgrade_containers.sh

Unmount USB Stick:

sudo umount /dev/sda1

Kind regards,

Martin