Scenario
I am on an embedded linux system. As usual /var/log/ is the directory when all the logs are stored. I have a directory called /safepath which is created during image creation and it is on persistent memory. It means that whatever I place under /safepath persists across reboot sessions.
I want the logs in /var/log/ to not be lost on every reboot and wish to make it persistent through the reboots. So I thought to mount /var/log/ on to /persists by doing a mount --bind /var/log /safepath which I read from this interesting discussion here
Question:
But doing this, still causes me to loose the data in /var/log/. Is this correct? How can make /var/log/ to persist accross reboot sessions?