Skip to content

Instantly share code, notes, and snippets.

@drola
Created July 29, 2021 08:42
Show Gist options
  • Save drola/2669b367839ce8b55847a92f174c8294 to your computer and use it in GitHub Desktop.
Save drola/2669b367839ce8b55847a92f174c8294 to your computer and use it in GitHub Desktop.
backup_photos.sh
#!/bin/bash
# See https://rclone.org/filtering/
FILTER_LIST="
# Exclude timelapse temporary files
- /LRTimelapse/**
- /LRTimelapse_frames/**
# Include everything else
+ *
"
echo "$FILTER_LIST" | rclone copy /media/drola/tb3/Photos /media/drola/SAMSUNG/Photos -P --filter-from -
echo "$FILTER_LIST" | rclone copy /media/drola/tb3/Photos b2-multimedia:bkp-multimedia/Photos -P --filter-from -
echo "$FILTER_LIST" | rclone copy /media/drola/SAMSUNG/photos_sorted b2-multimedia:bkp-multimedia/photos_sorted -P --filter-from -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment