Data exchange between several servers¶
In complex various of system deployment it’s sometimes required to install and configure several StaffCop Servers with the ability to exchange data between remote servers and the central one. To perform this task it’s required to configure the remote server for sending data to the central server. and choose the time of sending data (usually out of working hours).
Configure the central server:¶
- Open Admin -> Control panel -> Server settings and enable option API access is enabled
- Copy the API key to the clipboard
Configure a remote (slave server that will send data to the central server):¶
- open Admin -> Control panel -> Server settings and specify the IP address of the central server in Master server
- Insert the copied API key value into Master server API key
- Run command in Linux command-line interface:
echo "SAVE_REPORTS=True" | sudo tee -a /etc/staffcop/config
- Wait until data is accumulated on the server and run the command:
staffcop upload --all
The server on which the command is run on will connect to the Master server with API key and upload all the accumulated data to the master server.
This command should better be scheduled to be performed at night hours or any other convenient time with crontab, for example, at weekends, when load on the data transferring channel between the central and the remote server is minimal.
Note
Only events will be transferred from the slave server to the master one, files will not be transferred.
Note
After transferring data from a slave server to the master one the last transferred event ID is kept and the next transferring will start from the event following the last transferred.