You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
381 B
16 lines
381 B
#!/bin/bash -e
|
|
|
|
if [ $# -lt 2 ]; then
|
|
echo 'Usage: sync local_dir endpoint'
|
|
exit 1
|
|
fi
|
|
|
|
umask 002
|
|
|
|
TO=/mirror/root/$1
|
|
export RCLONE_CONFIG_S3_ENDPOINT=$2 RCLONE_CONFIG_S3_TYPE=s3 RCLONE_CONFIG_S3_PROVIDER=Other RCLONE_CONFIG_S3_ENV_AUTH=false
|
|
ADDRESS=$(cat ~/config/ADDRESS)
|
|
|
|
mkdir -p $TO
|
|
cd $TO
|
|
exec nice rclone sync --fast-list --use-server-modtime --bind $ADDRESS s3:s3/ $TO
|
|
|