I'm using Ubuntu 16.04.1 LTS. I have installed incron and added root to incron.allow.
Normally I use sudo incrontab -e
to add an incron job with the editor.
I need a command which can be run from a script which will add this line to the incrontab directly:
/home/ci-server/DB_Backups IN_MOVED_TO mv /home/ci-server/DB_Backups/$# /home/backup/$#
Once this line is shown via sudo incrontab -l
everything should be good to go.
I have found a couple of examples using cron but very little information exists for incron.