This also works well for now.
What I like to know is if I need all the settings. I copied the command from somewhere and thought that the default settings should do the job quite well.
So maybe no need to specify all of this. I had some trouble to find the default settings.
One thing which bugs me what happens to running rclone transfers when I shutdown my pc with "shutdown" and the transfer is still running. Will this damage anything? Is rclone restarting everything the next time?
And last question is how I would best include those settings as a variable in my call. since the line gets quit long and I want to do several calls, how can I use the parts I want to use every call as a variable? It should work like I did with the date_time variable right?
All will be OK. Nothing will be damaged. Next time only what has not been transferred will be processed.
I think it is bash question. You will find plenty of resources on Internet. Start simple with one variable and step by step add more, testing every change.
Your answer helped me a lot. I changed my bash script to this:
#!/bin/bash
if pidof -o %PPID -x “rclone-cron.sh”; then
exit 1
fi
logfilepath="/home/user/scripts/bash/log/rclone.log"
/usr/bin/rclone copy --verbose --log-file ${logfilepath} "/home/user/projects" "googledrive:backup/user/projects"
exit
Which seems to work well. I also managed to pack my logfile path into a variable and only include the variable into my rclone command. much more practical and short like this.
If you are interested, you can take a look at this script, I created it these days and if you want to use it, just put it in the /bin folder and in your cron job, put it like this: