Skip to content

Instantly share code, notes, and snippets.

@RafhaanShah
Last active January 15, 2022 18:29
Show Gist options
  • Save RafhaanShah/0d967b4686ec49f93fd58d983aebda13 to your computer and use it in GitHub Desktop.
Save RafhaanShah/0d967b4686ec49f93fd58d983aebda13 to your computer and use it in GitHub Desktop.
rclone cron job
#!/usr/bin/env bash
# https://rclone.org/
# crontab -e: 0 1 * * 0 /path/to/rclone.sh
set -eo pipefail
RCLONE="/home/raf/bin/rclone"
RCLONE_CONFIG="/home/raf/.config/rclone/rclone.conf"
export RCLONE_CONFIG_PASS="PASSWORD"
"${RCLONE}" --ask-password="false" --config="${RCLONE_CONFIG}" --transfers=30 sync "/home/raf/SOURCE/" "BACKEND:Backups/PATH/"
curl -m 10 --retry 5 https://hc-ping.com/123456789-abcdefghij
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment