RPI Full backup

Thanks for your answer

First , regarding your remark of enormous file , i am of course limiting the size of the created image with the following

dd if=/dev/mmcblk0 bs=4M count=75 | pv > /mnt/openwrt/openwrt_$(date +"%Y%m%d%H%M%S").img

This way only the first 300mb are backed up (you can also gzip the file) which is enough (the boot fat partition is 20 mb and overlay is 256mb)
Also you get an exact full copy of your setup and you do not need to reinstall packages or what ever you changed.

As for my problem with "out of date files" in the created img file , I do believe i tried the sync command and it did not work. (i will try again i guess)

As for your second suggestion

mount -o remount,ro ...

you meant something like the following

mount -o remount /overlay

Can you supply a full command to force the overlay to be fully written to the sd card ?

Thanks in advance.