Thanks for responding! I tried this on a small test directory and ran into problems. I edited the rclone_jobber.sh, to replace the new=“latest_backup” variable with new="$7".
The folder I’m trying to use as the latest backup folder is ‘music’, so in the job script, I set the variable new=“music”. The rclone target is “localtest_crypt”, set as $test_remote, which is a subfolder in my home dir called rclone_test.
My script reads:
#!/usr/bin/env sh
### testing using paramters to override the "latest_backup" folder name
#substitute $rclone_jobber and ${remote} with paths on your system
rclone_jobber=$rclone_jobber #path to rclone_jobber directory
source="/home/joti/test_rclone_data"
dest="${test_remote}:"
new="music"
move_old_files_to="dated_directory"
#options="--dry-run"
monitoring_URL=""
$rclone_jobber/rclone_jobber.sh "$source" "$dest" "$move_old_files_to" "$options" "$(basename $0)" "$monitoring_URL"
#display test directories (comment these if calling from job scheduler)
tree -a $source
rclone ls $dest
The output is:
Back up in progress 2018-08-21_21:51:35 _music_test.sh rclone sync /home/joti/test_rclone_data localtest_crypt:/ --backup-dir=localtest_crypt:/archive/2018/2018-08-21_21:51:35 --log-file=/home/joti/github_repos/rclone_jobber/rclone_jobber.log ERROR: _music_test.sh failed. rclone exit_code=7
The localtest_crypt:/ is what I think is wrong, like the rclone_jobber.sh isn’t handling the $new variable in the job script properly, but I don’t know why.