# How to share primary, secondary, and shared folders for failover configuration in Linux installations? Failover requires periodic data synchronization between the primary and secondary instances. This help document will guide you through the steps to share primary, secondary, and shared folders in Linux installations. This help document contains the steps to configure the following: - [Setting up file sharing between primary, secondary, and shared folder servers.](https://www.manageengine.com/network-monitoring/help/filesharing-failover-linux.html#setup) - [Install SSHFS in primary, secondary, and shared folder server.](https://www.manageengine.com/network-monitoring/help/filesharing-failover-linux.html#configure) [Click here for the steps to configure shared folders in Windows installations.](https://www.manageengine.com/network-monitoring/faq/sharing-primary-secondary-folders.html) ## How to setup file sharing between primary, secondary, and shared folder servers? In Linux installations, you can configure file sharing between your servers using Remote Synchronization (Rsync). Rsync is a powerful tool that can transfer and synchronize files and directories between two locations in a network. It can be used to transfer the differences between folders for keeping files and directories synchronized across the network. For the rsync to work, SSH authentication has to be configured between these servers. **Note:** - File sharing must be configured in all the three servers. (primary, secondary, and shared folder servers) - Root user's password is mandatory for all three servers. ### Follow the steps below to configure Rsync: - Log in to the server, launch a terminal and execute the `ssh-keygen` command. This will generate a pair of public and private keys. ![Configure Shared folders - ManageEngine OpManager](https://www.manageengine.com/network-monitoring/help/images/failover-linux-1.png) - Provide a path to store the generated keys in that directory, or save in default path. Press the Enter key twice to skip the password prompt. The public and private key will be generated successfully. ![Configure Shared folders - ManageEngine OpManager](https://www.manageengine.com/network-monitoring/help/images/failover-linux-2.png) - Copy the generated public key to the peer server using the command: ```bash ssh-copy-id -i root@ ``` The **** refers to the directory where the generated public key is saved. The **** refers to the server intended to be shared from the current server. - Enter the peer server's root password to successfully copy the current server's key to the peer server. ![Configure Shared folders - ManageEngine OpManager](https://www.manageengine.com/network-monitoring/help/images/failover-linux-3.png) - To verify if the key has been copied to the peer server, log in to the peer server from the current server using the command: ```bash ssh ``` - Once the login attempt is successful, use the command **exit** to log out. #### Note: To configure SSH authentication for a shared folder server from both primary and secondary servers, follow the above steps in both primary and secondary but replace, ****, with ****. ## Steps to configure shared folder using SSHFS in primary, secondary, and shared folder servers SSHFS (SSH File System) is a client tool that allows you to mount a remote file system onto your local server through an SSH connection, essentially creating a virtual local folder accessible by authorized users. SSHFS (Secure Shell Filesystem) uses the SSH (Secure Shell) protocol to communicate with the server, which encrypts all connections, keeping them secure. ### Pre-requisites: [SSH authentication should be configured](https://www.manageengine.com/network-monitoring/help/filesharing-failover-linux.html#setup) to shared folder server from primary and secondary servers. ### Steps to install SSHFS by following the below command based on your Linux OS: **Debian/Ubuntu:** ```bash sudo apt-get update sudo apt-get install sshfs ``` **CentOS/RHEL:** ```bash sudo yum install epel-release sudo yum install sshfs ``` **FEDORA:** ```bash dnf install fuse-sshfs ``` **SUSE:** ```bash sudo zypper install sshfs ``` After the installation is complete, create a folder in the required path **(eg: /opt/Failover/SharedFolder)** in shared folder server, so that the input provided for shared folder path during Failover Configuration should be in the format **SHARED_HOST:/Desired/Path eg: opm-shared:/opt/Failover/SharedFolder**.