You can export events and save a file with exported events on a network share of the Server computer. For the network share, you can use the Network File System (NFS) protocol, which lets you mount a share of another computer (for example, an NFS server export point) in the local file system of the Server computer. The directory is created and the network share is mounted using standard tools of the operating system.
When using the NFS protocol, the rpcbind software package is activated in the operating system. Keep in mind that attackers may try to use this software package to carry out some types of DDoS attacks. To eliminate the threat of intrusion, you must configure the firewall. In CentOS Stream, we recommend using the firewalld utility to configure the firewall.
Manually creating a directory and mounting a network share
To create a directory for saving files to a network share:
mkdir <
full path to the local directory
>
For example:
mkdir
~/nfsshare
sudo mount -t nfs <
name or IP address of the remote computer
>:\
<
full path to the network share
>\
<
full path to the local directory
>
For example:
sudo mount
-t nfs nfs-server.example:/nfsshare ~/nfsshare
mount | grep <
full path to the local directory
>
For example:
mount | grep ~/nfsshare
If the mount is successful, the displayed information contains the name or IP address of the remote computer, the name of the network share, and the name of the parent directory.
Automatically mounting a network share
To configure automatic mounting of a network share in the CentOS operating system:
Open the /etc/fstab file for editing as root and add the following line to the file:
<
name or IP address of the remote computer
>:<
full path to the network share
> <
full path to the local directory
> nfs defaults 0 0
For example:
nfs-server.example:/nfsshare /home/user1/nfsshare nfs defaults 0 0