Need help with script
I want a script to copy new files from seedbox to gdrive every 5 hours.
I already have rclone set up for my gdrive and crontab to run the script every 5 hours I just need the correct script that will only copy the new files and not everything.
This is the current script I have:
#!/bin/bash # RCLONE UPLOAD CRON TAB SCRIPT # Type crontab -e and add line below (without # ) # 0 */5 * * * /home/hiddenz08/scripts/rclone/rclone-upload.sh >/dev/null 2>&1 if pidof -o %PPID -x "rclone-upload.sh"; then exit 1 fi LOGFILE="/home/hiddenz08/scripts/logs/rclone-upload.log" FROM="/home/hiddenz08/torrents/rtorrent/" TO="Gdrive:/" rclone copy $FROM $TO --config /home/hiddenz08/.config/rclone/rclone.conf --log-file=$LOGFILE echo "$(date "+%d.%m.%Y %T") RCLONE UPLOAD ENDED" | tee -a $LOGFILE fi exit