Thank you for your input. But it does not seem to be working.
On the SD card the ~100 GB is the music directory. Somehow the script wants to create an image of 103 GB.
pi@raspberrypi3:~/scripts/image-utils $ sudo ./image-backup --options --exclude=/home/pi/*
Image file to create? /media/SharedonRouter/pibkp3/bkp.img
Initial image file ROOT filesystem size (MB) [103791]? ^C
Aborted
I aborted as the size in MB is much larger than what it should be.
The '--exclude=/home/pi/*' option is simply fed to rsync (that actually does the backup). The estimated backup size is based on the output of a 'df' command and no attempt is made to figure out what the exclusion option might reduce that by. You don't have to accept the default/estimated backup size and you can specify whatever you feel is a more realistic value.
It doesn't matter what you specify for 'Initial image file ROOT filesystem size (MB)' as long as (1) it's large enough to hold the actual files being backed up and (2) there's enough free space on the destination filesystem to hold the actual files being backed up. When the backup completes, the image file will be shrunk (using resize2fs) to the smallest size possible.
Statistics: Posted by RonR — Sat Apr 20, 2024 1:23 am