Skip to content

Instantly share code, notes, and snippets.

@oprietop
Created October 27, 2016 09:11
Show Gist options
  • Save oprietop/e3f7e26a6f06de3c94af2d3963bb7058 to your computer and use it in GitHub Desktop.
Save oprietop/e3f7e26a6f06de3c94af2d3963bb7058 to your computer and use it in GitHub Desktop.
Looping a rclone transfer to test google drive throughput and errors.
#!/usr/bin/env sh
set -x # Be verbose
set -u # Exit if unbound variables
FILE="/home/user/bigfile.iso"
DEST="gdrive_user"
DIR="test"
while true; do
DATE=`date "+%Y-%m-%d_%H:%M:%S"`
FLAGS="-v --stats 0 --log-file rclone-${DATE}.log"
rclone $FLAGS purge $DEST:$DIR
rclone $FLAGS mkdir $DEST:$DIR
rclone lsd $DEST:
rclone $FLAGS copy $FILE $DEST:$DIR
rclone $FLAGS purge $DEST:$DIR
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment