2016-11-03 22:25:16 +01:00
|
|
|
#!/usr/bin/env bash
|
2016-11-15 22:28:53 +01:00
|
|
|
#
|
2016-11-03 22:25:16 +01:00
|
|
|
#
|
|
|
|
# Prerequisite:
|
2016-11-15 22:28:53 +01:00
|
|
|
# rclone configured with:
|
|
|
|
# - remote Amazon Cloud Drive named `amazon`
|
|
|
|
# - remote AWS S3 named `s3`
|
2016-11-03 22:25:16 +01:00
|
|
|
#
|
|
|
|
# brew install rclone
|
|
|
|
# rclone config
|
2016-11-15 22:28:53 +01:00
|
|
|
#
|
2016-11-03 22:25:16 +01:00
|
|
|
# http://rclone.org/commands/rclone_copy/
|
|
|
|
# http://rclone.org/commands/rclone_sync/
|
|
|
|
|
2017-03-24 03:13:40 +01:00
|
|
|
DEFAULTS_AMAZON='--exclude .DS_Store'
|
2016-11-15 22:28:53 +01:00
|
|
|
|
|
|
|
# Sync up Movies
|
2017-06-12 01:21:12 +02:00
|
|
|
rclone sync "$MOVIES_DIR" amazon:/Movies "$DEFAULTS_AMAZON"
|
2016-11-15 22:28:53 +01:00
|
|
|
|
|
|
|
# Sync up TV Shows
|
2017-06-12 01:21:12 +02:00
|
|
|
rclone sync "$TVSHOWS_DIR" amazon:"/TV Shows" "$DEFAULTS_AMAZON"
|
2016-11-15 22:28:53 +01:00
|
|
|
|
|
|
|
# Sync up iTunes
|
2017-06-12 01:21:12 +02:00
|
|
|
rclone sync "$ITUNES_DIR" amazon:/Music/iTunes "$DEFAULTS_AMAZON"
|
2016-11-03 22:25:16 +01:00
|
|
|
|
2016-11-15 22:28:53 +01:00
|
|
|
# Sync down all S3 buckets
|
2017-06-12 01:21:12 +02:00
|
|
|
#rclone sync s3: $S3BACKUP_DIR
|