Great question — answering as the UphillTech team:
I would recommend using the Lsync daemon to achieve what you want. You can read up on it here . It basically watches a directory for any changes and then acts on those changes. Typically just copying files, via Rsync, from one location to another. On Red Hat/CentOS, for example, you would install it like this. First, enable the EPEL repository like this: sudo yum install epel-release Then install it like this: sudo yum install lsyncd Once installed, edit the configuration like this for the Red Hat/CentOS install: sudo nano /etc/lsyncd.conf Or this config for an Ubuntu/Debian install: sudo nano /etc/lsyncd/lsyncd.conf.lua And adjust to your needs: ---- -- User configuration file for lsyncd....
Full answer by Giacomo1968: https://superuser.stackexchange.com/a/1940206 (CC BY-SA 4.0).
Need it done for your business? UphillTech.