Need help on how to run "rclone move" command inside docker container every night

What is the problem you are having with rclone?

I don't know how to get a cron-like behavior for my bash command to sync my folders every night.

I'm moving my rclone installation to docker and got stuck on the part of doing what was previously a cron job in my host system, I sync my local and cloud folder mounts (mergerfs) every night and being pretty much a noob with docker, I'm not sure how to approach this part.

this and running a vfs/refresh after mount are the last two pending tasks of my media server that I can't figure out how to replicate with docker.

Run the command 'rclone version' and share the full output of the command.

rclone v1.56.2

  • os/version: alpine 3.14.2 (64 bit)
  • os/kernel: 5.15.0-41-generic (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.17.1
  • go/linking: static
  • go/tags: none

Which cloud storage system are you using? (eg Google Drive)

Google Drive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone move

The rclone config contents with secrets removed.

[Vault]
type = drive
client_id = *
client_secret = *
scope = drive
token = {"access_token":"*","token_type":"Bearer","refresh_token":"*","expiry":"*"}

[VaultCrypt]
type = crypt
remote = Vault:Vault
filename_encryption = standard
directory_name_encryption = true
password = *
password2 = *

A log from the command with the -vv flag

doesn't apply

Ended up using this image as another container pfidr/rclone - Docker Image | Docker Hub

With this definition, using 1.56.2 instead of latest only because I wanted to match the version of rclone I'm using on that container

rclone-local-to-cloud-sync:
    image: pfidr/rclone:1.56.2
    container_name: rclone-local-to-cloud-sync
    restart: unless-stopped
    volumes:
      - ${PATH_RCLONE}:/config
      - ${PATH_MOUNT_LOCAL}:/VaultCrypt
    environment:
      # see more flags at https://hub.docker.com/r/pfidr/rclone/dockerfile
      - "UID=${UID}"
      - "GID=${GID}"
      - "TZ=${TZ}"
      - "RCLONE_CMD=move"
      - "SYNC_SRC=/VaultCrypt"
      - "SYNC_DEST=VaultCrypt:"
      # - "CHECK_URL=https://hc-ping.com/.../"
      - "CRON=0 4 * * *" 
      - "CRON_ABORT=0 12 * * *"
      - "FORCE_SYNC=0"
      - "SYNC_OPTS=-v --delete-empty-src-dirs --exclude=Downloads/** --order-by name --drive-stop-on-upload-limit --min-age=24h --transfers=1 --drive-chunk-size=128m"
  

Did a few tests and worked fine, but since this is still a bulding process for a new server, it will be a couple of weeks since I know how it works on a daily basis

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.