Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I preserve file/files in the /var directory?

directory file files preserve var
0
Posted

How do I preserve file/files in the /var directory?

0

Everything in the /var directory is stored in RAM, hence it will be wiped out when rebooting. The default contents of the /var directory (present when booting the board) is stored in the /.var.tar file. If you would like to save something that reside in the /var directory one thing that can be done is to create a symbolic link to a writeable partition, e.g., /etc. Since the /.var.tar file reside in the read only root file system changes to this file must be done when building the firmware image. One solution to circumvent this is to create a script that create the symbolic link while booting.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123