I recently upgraded to FreeNAS v11.3, and because of issues with the upgrade (it failed for some reason), I did a clean reinstall from USB of v11.3. Once that was done and working, I noticed (the next morning) that my rclone backup script was failing (see my resource).
The error I was getting was:
[CODE]2020/02/15 00:00:00 NOTICE: Config file "/.config/rclone/rclone.conf" not found - using defaults
2020/02/15 00:00:00 Failed to create file system for "secret:/": didn't find section in config file[/CODE]
Ahh, easy fix I thought, as obviously due to the fresh install the rclone.conf file was missing my particular settings and needed creating. So I proceeded to run rclone config from a SSH connection, and recreated my B2 configuration.
I then ran the script from the CLI:
And it worked, and I got my email with the backup results in - great I though.
The next day I get up and find that the scheduled cron task at midnight had failed again, and with the same error as last time (see above). So I logged in a SSH session and reran it from the CLI again, and it worked fine. I was now slightly confused!!
I then had a brainstorm, and came up with the command rclone config file, which tells you the location of the config file, and I got the following response:
[CODE]rclone config file
configuration file is stored at:
Immediately, I saw that the config file was in a different location that the path detailed in the error I was getting. So I copied the file over:
[CODE]cp /root/.config/rclone/rclone.conf /.config/rclone/rclone.conf[/CODE]
and the overnight cron job now works as expected!
What I don't understand is why running a shellscript via cron (setup via the GUI) is looking for the rclone.conf config file in a different location than when you run the same script from the CLI via an SSH connection - this was never the case in FreeNAS v11.2-U7. I was previously informed that the rclone config file saved via the CLI is different to the one used in the FreeNAS GUI Cloud Sync Tasks, so its safe to update this configuration file via rclone config without affecting anything you have configured in the FreeNAS GUI.
Has the functionality changed, or is it a bug?