I use the following commands to copy the entire directory to another server.
Sending server:
cd /var/log/ && tar c mysql > to_analyse.tar && nc 10.10.10.99 1236 < to_analyse.tar
Receiving server:
mkdir -p /var/log/splunk/from_217 && cd /var/log/splunk/from_217 && nc -l 1236 > to_analyse.tar && tar -xf to_analyse.tar
It is working as expected. But when I add it to cron (copy paste with appropriate times), it does not work.