Created
June 21, 2019 20:40
-
-
Save trapexit/e9fbf3c848fd0840cc7694a27bff4629 to your computer and use it in GitHub Desktop.
script for simplifying backup with rclone
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
USERAGENT="Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0" | |
TARGET="${1}" | |
path="${2}" | |
backup_dir="${TARGET}:archive/$(date +%Y)/$(date +%F_%T)/${path}" | |
rclone \ | |
--checkers=3 \ | |
--tpslimit=3 \ | |
--transfers=3 \ | |
--retries=128 \ | |
--retries-sleep=1m \ | |
--drive-chunk-size=32M \ | |
--progress \ | |
--stats=1s \ | |
--backup-dir="${backup_dir}" \ | |
--fast-list \ | |
--user-agent="${USERAGENT}" \ | |
sync \ | |
${path} \ | |
${TARGET}:${path} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment