@lost-in-translation
Bin zwar kein alter Hase was ioBroker angeht, aber zum Thema Sicherung der SD Karte, inkl. ioBroker (könnte ja sein, das die SD Karte irgendwann mal den Geist aufgibt, o.ä.)
Dies funktioniert sehr gut im laufenden Betrieb mit rpi-cloner.
Vorgehensplan:
Das zurückschreiben auf eine neue SD Karte oder einen bootbaren USB Stick ist ebenfalls kein Hexenwerk. Nähere Info´s zum Raspi-cloner findest Du hier https://github.com/billw2/rpi-clone
Script Ablauf:
pi@ioBroker-RasPi:~/rpi-clone $ sudo rpi-clone sda
Booted disk: mmcblk0 15.5GB Destination disk: sda 7.7GB
Part Size FS Label Part Size FS Label
1 /boot 43.5MB fat32 -- 1 7.7GB fat32 --
2 root 15.5GB ext4 rootfs
//Initialize: IMAGE mmcblk0 partition table to sda - FS types mismatch//
1 /boot (22.5MB used) : IMAGE to sda1 FSCK
2 root (2.5GB used) : RESIZE(7.7GB) MKFS SYNC to sda2
Run setup script : no
Verbose mode : no
-----------------------:
** WARNING ** : All destination disk sda data will be overwritten!
: The partition structure will be imaged from mmcblk0.
-----------------------:
Initialize and clone to the destination disk sda? (yes/no): y
Optional destination ext type file system label (16 chars max): iobrokerclone
Initializing
Imaging past the start of /boot partition 2.
=> dd if=/dev/mmcblk0 of=/dev/sda bs=1M count=52 ...
Resizing last partition to end of disk ...
Resize success.
Changing destination Disk ID ...
Delaying so partprobe can update /dev entries ...
=> fsck -p /dev/sda1 ...
=> mkfs -t ext4 -L iobrokerclone /dev/sda2 ...
Syncing file systems (can take a long time)
Syncing mounted partitions:
Mounting /dev/sda2 on /mnt/clone
=> rsync // /mnt/clone with-root-excludes ...
Mounting /dev/sda1 on /mnt/clone/boot
=> rsync /boot/ /mnt/clone/boot ...
Editing /mnt/clone/boot/cmdline.txt PARTUUID to use 3bd134d9
Editing /mnt/clone/etc/fstab PARTUUID to use 3bd134d9
Done with clone to /dev/sda
Start - 20:09:11 End - 20:25:02 Elapsed Time - 15:51
Cloned partitions are mounted on /mnt/clone for inspection or customizing.
Hit Enter when ready to unmount the /dev/sda partitions ...
unmounting /mnt/clone/boot
unmounting /mnt/clone
Bei Fragen, einfach fragen
Gruß
Holger