Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8621

Advanced users • Re: Image File Utilities

$
0
0
Question: Do 'Image File Utilities' (image-backup in particular) support backup of "LVM" (logical volume manager) disks/SD cards?

I don't have any experience with LVM, so I can't directly answer your question.

Why not simply try it and find out (image-backup doesn't alter the system that's being backed up).
Good suggestion! :) After pondering LVM for a bit, I decided to scale back my ambitions, and try backing up a `btrfs-converted` file system. Here's what I did:

Code:

# removed SD card & plugged it in to another RPi system w/ required utilities installed; thensudo btrfs-convert -L /dev/sda2# made various other changes to support a boot from btrfs; i.e.# modified 'cmdline.txt' to change ext4 to btrfs, eliminate fsck # modified '/etc/fstab' to change ext4 to btrfs, left "PARTUUID=26576298-02" unchanged (??)# added 'btrfs' to '/etc/initramfs-tools/modules', and ran 'update-initramfs -u'
Once the system booted, and behaved normally for about a day, I tried to do an image-backup. This failed initially as shown below:

Code:

sudo image-backupImage file to create? /mnt/SynNAS/rpi_share/rpi2w/20251115_Pi2W_trixie_btrfs_bkup2.imgInitial image file ROOT filesystem size (MB) [4978]? 5100Added space for incremental updates after shrinking (MB) [0]? 200Create /mnt/SynNAS/rpi_share/rpi2w/20251115_Pi2W_trixie_btrfs_bkup2.img (y/n)? yStarting full backup (for incremental backups, run: /usr/local/sbin/image-backup /mnt/SynNAS/rpi_share/rpi2w/20251115_Pi2W_trixie_btrfs_bkup2.img)rsync: [receiver] write failed on "/tmp/img-backup-mnt/ext2_saved/image": No space left on device (28)rsync error: error in file IO (code 11) at receiver.c(381) [receiver=3.4.1]rsync: [sender] write error: Broken pipe (32)Unable to create backup
/ext2_saved is created during btrfs-convert to provide a "rollback" path/escape hatch. As I already had a "rollback" mechanism via image-backup , I simply deleted /ext2_saved, and tried again. The next effort appeared to be successful, but got some feedback that leaves me wondering... :

Code:

sudo image-backupImage file to create? /mnt/SynNAS/rpi_share/rpi2w/20251115_Pi2W_trixie_btrfs_bkup3.imgInitial image file ROOT filesystem size (MB) [3557]? 3600Added space for incremental updates after shrinking (MB) [0]? 400Create /mnt/SynNAS/rpi_share/rpi2w/20251115_Pi2W_trixie_btrfs_bkup3.img (y/n)? yStarting full backup (for incremental backups, run: /usr/local/sbin/image-backup /mnt/SynNAS/rpi_share/rpi2w/20251115_Pi2W_trixie_btrfs_bkup3.img)### WARNING 1:rm: cannot remove '/tmp/img-backup-mnt/boot/firmware': Device or resource busye2label: Bad magic number in super-block while trying to open /dev/mmcblk0p2### END WARNINGe2fsck 1.47.2 (1-Jan-2025)Pass 1: Checking inodes, blocks, and sizesPass 2: Checking directory structurePass 3: Checking directory connectivityPass 4: Checking reference countsPass 5: Checking group summary information/dev/mmcblk0p2_c: 77853/230608 files (0.3% non-contiguous), 554122/921344 blocksresize2fs 1.47.2 (1-Jan-2025)Resizing the filesystem on /dev/loop3p2 to 748083 (4k) blocks.The filesystem on /dev/loop3p2 is now 748083 (4k) blocks long.resize2fs 1.47.2 (1-Jan-2025)Resizing the filesystem on /dev/loop3p2 to 743848 (4k) blocks.The filesystem on /dev/loop3p2 is now 743848 (4k) blocks long.resize2fs 1.47.2 (1-Jan-2025)Resizing the filesystem on /dev/loop3p2 to 743840 (4k) blocks.The filesystem on /dev/loop3p2 is now 743840 (4k) blocks long.e2fsck 1.47.2 (1-Jan-2025)Pass 1: Checking inodes, blocks, and sizesPass 2: Checking directory structurePass 3: Checking directory connectivityPass 4: Checking reference countsPass 5: Checking group summary information/dev/mmcblk0p2_c: 77853/182896 files (0.3% non-contiguous), 550226/743840 blockse2fsck 1.47.2 (1-Jan-2025)Pass 1: Checking inodes, blocks, and sizesPass 2: Checking directory structurePass 3: Checking directory connectivityPass 4: Checking reference countsPass 5: Checking group summary information/dev/mmcblk0p2_c: 77853/182896 files (0.3% non-contiguous), 550226/743840 blocksresize2fs 1.47.2 (1-Jan-2025)Resizing the filesystem on /dev/loop1p2 to 846240 (4k) blocks.The filesystem on /dev/loop1p2 is now 846240 (4k) blocks long.e2fsck 1.47.2 (1-Jan-2025)Pass 1: Checking inodes, blocks, and sizesPass 2: Checking directory structurePass 3: Checking directory connectivityPass 4: Checking reference countsPass 5: Checking group summary information/dev/mmcblk0p2_c: 77853/206752 files (0.3% non-contiguous), 552174/846240 blocks### WARNING 2:rm: cannot remove '/tmp/img-backup-mnt/boot/firmware': Device or resource busy### END WARNING


I looked in /tmp/img-backup-mnt/boot/firmware - it was empty. I don't understand the "Bad magic number ..." message either.

Can you explain these warnings, and what (if anything) should be done about them?

Thanks,
~s

Statistics: Posted by shawn-o — Sun Nov 16, 2025 1:11 am



Viewing all articles
Browse latest Browse all 8621

Trending Articles