Skip to content

Instantly share code, notes, and snippets.

@coulterpeterson
Last active December 18, 2024 15:27
Show Gist options
  • Save coulterpeterson/9b15d658ab85f86d4890b80f5bdc36cf to your computer and use it in GitHub Desktop.
Save coulterpeterson/9b15d658ab85f86d4890b80f5bdc36cf to your computer and use it in GitHub Desktop.
rclone recipes

Command Types

Sync from one local drive to another

rclone sync "C:\Users\USERNAME\folder" "F:\backups\folder" -P --create-empty-src-dirs --ignore-errors

Sync local directory to SMB share (in this case backing up CapCut projects data)

rclone sync "C:\Users\USERNAME\AppData\Local\CapCut\User Data\Projects\com.lveditor.draft" "SMB_REMOTE_NAME:f\CapCut Projects Backup" -P --create-empty-src-dirs --ignore-errors

Sync Google Photos to local backup drive

rclone sync Personal-Google-Photos: "F:\Google Photos" -P --create-empty-src-dirs

Automation on Windows

  • Pre-req: Install rclone with chocolatey
  • Create folder C:\scripts
  • Create a .bat file with your desired sync commands from above
  • Open Task Scheduler and create a 'Custom' folder
  • In the Custom folder, create a new Task, name it something useful, set the trigger to "time based" as often as you want, and for the action set it to "Start a program, and point it at your .bat script located in C:\scripts"
    • It's also a good idea to Disable the default conditions in the 'Conditions' tab if you prefer
    • Tweak anything else about the task you like, then click 'OK'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment