How do I preserve file/files in the /var directory?
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.