This commit is contained in:
James Turland
2023-09-20 22:34:29 +01:00
commit 6e00e0aa3f
77 changed files with 6752 additions and 0 deletions

36
rClone/docker-compose.yml Normal file
View File

@@ -0,0 +1,36 @@
version: '3'
services:
rclone:
image: rclone/rclone:latest
container_name: rclone
security_opt:
- no-new-privileges:true
restart: unless-stopped
command: rcd --rc-web-gui --rc-addr 0.0.0.0:5572 --rc-web-fetch-url=https://api.github.com/repos/rclone/rclone-webui-react/releases/latest --rc-web-gui-update --rc-user user --rc-pass rclone -vv --checksum --transfers=4 --checkers=4 --contimeout=60s --timeout=300s --retries=3 --low-level-retries=10 --stats=1s --stats-file-name-length=0
#ports:
# - "5572:5572" add this port if you're not using a proxy
volumes: #be sure to amend the below to your user and directories
- /home/ubuntu/docker/rclone/config:/config/rclone #location of your rclone config file (i.e., where the remote and secrets are stored)
- /home/ubuntu/docker/rclone-dashboard/sync_script:/sync_script #script to allow remote execution of backups (e.g., rclone copy --checksum --verbose --transfers 1 --checkers 4 --contimeout 60s --timeout 300s --retries 3 --low-level-retries 10 --stats 1s /YOUR_FOLDER YOUR_REMOTE:REMOTE_FOLDER/sync_script)
- /home/ubuntu/truenas:/data #this is my truenas SMB share - change to wherever you store the data you wish to upload
environment:
- PHP_TZ=Europe/London
networks:
proxy: #remove the proxy network if you're not using traefik
labels: #remove the labels section if you're not using traefik
- "traefik.enable=true"
- "traefik.http.routers.rclone-dashboard.entrypoints=http"
- "traefik.http.routers.rclone-dashboard.rule=Host(`rclone-dashboard.your-domain.co.uk`)"
- "traefik.http.routers.rclone-dashboard.middlewares=default-whitelist@file"
- "traefik.http.middlewares.rclone-dashboard-https-redirect.redirectscheme.scheme=https"
- "traefik.http.routers.rclone-dashboard.middlewares=rclone-dashboard-https-redirect"
- "traefik.http.routers.rclone-dashboard-secure.entrypoints=https"
- "traefik.http.routers.rclone-dashboard-secure.rule=Host(`rclone-dashboard.your-domain.co.uk`)"
- "traefik.http.routers.rclone-dashboard-secure.tls=true"
- "traefik.http.routers.rclone-dashboard-secure.service=rclone-dashboard"
- "traefik.http.services.rclone-dashboard.loadbalancer.server.port=5572"
- "traefik.docker.network=proxy"
networks:
proxy:
external: true

View File

@@ -0,0 +1,26 @@
version: "3.8"
services:
rclone:
image: rclone/rclone
container_name: rclone_mount
security_opt:
- apparmor:unconfined
restart: unless-stopped
volumes:
- type: bind
source: /home/ubuntu/GoogleDrive_NAS_crypt #change this to the folder location you want to mount to (on your host)
target: /data
bind:
propagation: shared
- /etc/passwd:/etc/passwd:ro
- /etc/group:/etc/group:ro
- /home/ubuntu/docker/rclone/config:/config/rclone #rclone config location (i.e., the remote credentials)
- /home/ubuntu/docker/rclone/log:/log
- /home/ubuntu/docker/rclone/cache:/cache
privileged: true
cap_add:
- SYS_ADMIN
devices:
- /dev/fuse #IMPORTANT need to install FUSE on the host first. This is used to mount the remote to the host
command: "mount NAME_OF_YOUR_REMOTE:/NAME_OF_FOLDER_TO_MOUNT /data --log-file /log/rclone.log --log-level ERROR --umask 002 --buffer-size 128M --checkers 20 --transfers 5 --vfs-read-ahead 1G --vfs-cache-mode writes --allow-other --allow-non-empty &"

View File

@@ -0,0 +1 @@
rclone mount YOUR_REMOTE: G: --dir-cache-time 1440m --poll-interval 15s --fast-list --buffer-size 256M --vfs-cache-mode writes --vfs-read-ahead 256M --vfs-read-chunk-size-limit=off --vfs-read-chunk-size=128M --tpslimit 10

4
rClone/remote-upload Normal file
View File

@@ -0,0 +1,4 @@
#this script will initiate a remote upload using the docker container. Example use case: you can run this on a windows machine that will send a command to the docker container to tell it to perform a backup.
#you can track the progress of the operation using the rclone dashboard
#the exluderule will allow you to skip certain folders (example below)
rclone rc sync/copy srcFs="YOUR_SOURCE:/data" _filter={\"ExcludeRule\":[\"rClone/**\",\"Frigate/**\",\"dump/**\",\"ISOConvert/**\",\"GooglePhotosBackup/**\"]} dstFs="YOUR_REMOTE:FOLDER" --rc-addr=https://IP-OR-DNS-OF-RCLONE --rc-user=james --rc-pass=rclone _async=true -vv --checksum --transfers=1 --checkers=4 --contimeout=60s --timeout=300s --retries=3 --low-level-retries=10 --stats=1s --stats-file-name-length=0 --fast-list

1
rClone/sync_script Normal file
View File

@@ -0,0 +1 @@
rclone rc sync/copy srcFS=FOLDER_ON_HOST:/ dstFs=REMOTE_NAME:REMOTE_FOLDER --rc-addr=:5572 --rc-user=user --rc-pass=rclone _async=true/sync_script