Enable Persistent Log File Storage to a Linux Host Directory
In a cSRX Container Firewall container, log files are stored in the /var/log directory. By default, if there are no external volumes mounted for the /var/log directory, the log files are maintained only for this cSRX Firewall container. If, in future, the cSRX container is deleted, those log files are lost. You can enable persistent log file storage to a Linux host directory as a means to directly mount a directory from a Linux host to the cSRX container when the cSRX is launched.
To configure the cSRX container to enable persistent log file storage to a Linux host directory, use the following command.
root@csrx-ubuntu3:~/csrx# docker run
-d --privileged --network=mgt_bridge -e CSRX_FORWARD_MODE="routing"
-e CSRX_PACKET_DRIVER="poll" –e CSRX_CTRL_CPU="0x1" –e
CSRX_DATA_CPU="0x6" -v <path-log-directory-on-host>:/var/log --name=<csrx-container-name> <csrx-image-name>