Skip to content

ecBox CLI : rclone

Several tools are avaiable to manage the contents of ecBox site.

Either use ECMWF in-house developed command line tool called sitesctl as documented here https://sites.ecmwf.int/docs/sites/cli/ or use rclone.

This page shows how to use command line to manage the contents on the ecBox site. We will use rclone to manage ecBox contents

Install rclone

This step is required only if you don't have rclone utility on your machine
rclone can be downloaded from https://downloads.rclone.org/

The following installs rclone in the user home directory (~/bin) in linux

curl -Of https://downloads.rclone.org/rclone-current-linux-amd64.zip
unzip rclone-current-linux-amd64.zip
cd rclone-*-linux-amd64
# Copy binaries to a local bin folder in your home
mkdir -p ~/bin
cp rclone ~/bin/
# Add it to PATH
echo 'export PATH=$HOME/bin:$PATH' >> ~/.bashrc
source ~/.bashrc

Test installation

Check if rclone is installed properly by running version command as follows:

 rclone version
rclone v1.71.1
- os/version: redhat 8.10 (64 bit)
- os/kernel: 4.18.0-553.74.1.el8_10.x86_64 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.25.1
- go/linking: static
- go/tags: none

Config rclone

  1. Add a new rclone remote

     rclone config
    Current remotes:
    
    Name                 Type
    ====                 ====
    
    e) Edit existing remote
    n) New remote
    d) Delete remote
    r) Rename remote
    c) Copy remote
    s) Set configuration password
    q) Quit config
    e/n/d/r/c/s/q> n
    
    Enter name for new remote.
    name> Demo1
    

  2. Enter the number that corresponds to WebDAV storage. In this case, it is number 52

    Option Storage.
    Type of storage to configure.
    Choose a number from below, or type in your own value.
     1 / 1Fichier
       \ (fichier)
     2 / Akamai NetStorage
       \ (netstorage)
     3 / Alias for an existing remote
       \ (alias)
     4 / Amazon Drive
       \ (amazon cloud drive)
     5 / Amazon S3 Compliant Storage Providers including AWS, Alibaba, ArvanCloud, Ceph, ChinaMobile, Cloudflare, DigitalOcean, Dreamhost, GCS, HuaweiOBS, IBMCOS, IDrive, IONOS, LyveCloud, Leviia, Liara, Linode, Minio, Netease, Petabox, RackCorp, Rclone, Scaleway, SeaweedFS, StackPath, Storj, Synology, TencentCOS, Wasabi, Qiniu and others
       \ (s3)
    < REDACTED FOR BREVITY>
    49 / Transparently chunk/split large files
       \ (chunker)
    50 / Union merges the contents of several upstream fs
       \ (union)
    51 / Uptobox
       \ (uptobox)
    52 / WebDAV
       \ (webdav)
    53 / Yandex Disk
       \ (yandex)
    54 / Zoho
       \ (zoho)
    55 / premiumize.me
       \ (premiumizeme)
    56 / seafile
       \ (seafile)
    Storage> 52
    

  3. Enter the ecBox URL (provided to you)

    Option url.
    URL of http host to connect to.
    E.g. https://example.com.
    Enter a value.
    url> https://sites.ecmwf.int/ecbox/demo/s/dav/
    

  4. Enter the number that corresponds to Other site/service or software. In this case, it is number 7

    Option vendor.
    Name of the WebDAV site/service/software you are using.
    Choose a number from below, or type in your own value.
    Press Enter to leave empty.
     1 / Fastmail Files
       \ (fastmail)
     2 / Nextcloud
       \ (nextcloud)
     3 / Owncloud
       \ (owncloud)
     4 / Sharepoint Online, authenticated by Microsoft account
       \ (sharepoint)
     5 / Sharepoint with NTLM authentication, usually self-hosted or on-premises
       \ (sharepoint-ntlm)
     6 / rclone WebDAV server to serve a remote over HTTP via the WebDAV protocol
       \ (rclone)
     7 / Other site/service or software
       \ (other)
    vendor> 7
    

  5. Enter the username as ecbox

    Option user.
    User name.
    In case NTLM authentication is used, the username should be in the format 'Domain\User'.
    Enter a value. Press Enter to leave empty.
    user> ecbox
    

  6. Enter the option that corresponds to Yes, type in my own password. In this case, it is y and enter the token (provided to you)

    Option pass.
    Password.
    Choose an alternative below. Press Enter for the default (n).
    y) Yes, type in my own password
    g) Generate random password
    n) No, leave this optional password blank (default)
    y/g/n> y
    Enter the password:
    password:
    Confirm the password:
    password:
    

  7. Press Enter to leave empty for bearer token

    Option bearer_token.
    Bearer token instead of user/pass (e.g. a Macaroon).
    Enter a value. Press Enter to leave empty.
    bearer_token> 
    

  8. Select no n for editing advanced config.

    Edit advanced config?
    y) Yes
    n) No (default)
    y/n> n
    

  9. Confirm the configuration by entering y for yes

    Configuration complete.
    Options:
    - type: webdav
    - url: https://sites.ecmwf.int/ecbox/demo/s/dav/
    - vendor: other
    - user: ecbox
    - pass: *** ENCRYPTED ***
    Keep this "Demo1" remote?
    y) Yes this is OK (default)
    e) Edit this remote
    d) Delete this remote
    y/e/d> y
    
    Current remotes:
    
    Name                 Type
    ====                 ====
    Demo1                webdav
    

  10. Quit the rclone config mode by entering q for quit

    e) Edit existing remote
    n) New remote
    d) Delete remote
    r) Rename remote
    c) Copy remote
    s) Set configuration password
    q) Quit config
    e/n/d/r/c/s/q> q
    

Managing contents

Before continuing with upload/download of files with ecBox, check if the remote is OK by running.

# 
 rclone listremotes
Demo1:

 rclone ls Demo1:
<empty>

For the examples below, we will use the following directory on the local machine.

 tree /home/marp/Downloads/ecbox_demo
/home/marp/Downloads/ecbox_demo
├── assessment-of-the-arctic-weather-satellite-in-nwp.pdf
├── delete.gif
├── ifs
   └── 81623-ifs-documentation-cy49r1-part-i-observations.pdf
├── newsletter
   ├── 2024
      └── 81618-ifs-upgrade-improves-near-surface-wind-and-temperature-forecasts.pdf
   ├── 81666-newsletter-no-184-summer-2025.pdf
   └── http_redirects.yml
├── splunk-download-links.txt
└── upload.gif

3 directories, 8 files

Upload

  1. Upload a directory from local machine to ecBox site (remote)
 rclone sync newsletter/ Demo1:newsletter

Test successful upload by running

 rclone ls Demo1:
 16733628 newsletter/81666-newsletter-no-184-summer-2025.pdf
     1164 newsletter/http_redirects.yml
  2992766 newsletter/2024/81618-ifs-upgrade-improves-near-surface-wind-and-temperature-forecasts.pdf

Note

rclone sync expects both source and destination to be directories

  1. Upload a file from local machine to ecBox site (remote)

 rclone copyto ifs/81623-ifs-documentation-cy49r1-part-i-observations.pdf Demo1:newdir_for_ifs/ifs-doc.pdf
the above command automatically creates the directory newdir_for_ifs in ecBox

  1. Upload several files matching a pattern e.g. all PDF files from local machine to ecBox site (remote)
  • Keep the dir structure

     rclone copy . Demo1:all_pdfs --include "*.pdf" -v
    2025/10/17 12:15:11 INFO  : newsletter/2024/81618-ifs-upgrade-improves-near-surface-wind-and-temperature-forecasts.pdf: Copied (new)
    2025/10/17 12:15:12 INFO  : ifs/81623-ifs-documentation-cy49r1-part-i-observations.pdf: Copied (new)
    2025/10/17 12:15:16 INFO  : assessment-of-the-arctic-weather-satellite-in-nwp.pdf: Copied (new)
    2025/10/17 12:15:27 INFO  : newsletter/81666-newsletter-no-184-summer-2025.pdf: Copied (new)
    2025/10/17 12:15:27 INFO  : 
    Transferred:       54.518 MiB / 54.518 MiB, 100%, 1.966 MiB/s, ETA 0s
    Transferred:            4 / 4, 100%
    Elapsed time:        25.6s
    

  • Flatten the dir structure i.e. all matched files to go directly into one folder (flat layout)

    find . -type f -name '*.pdf' -exec sh -c '
      for f do
        rclone copyto "$f" "Demo1:all_pdfs/$(basename "$f")"
      done
    ' sh {} +
    

Download

  1. Download a folder from ecBox site (remote)

     rclone copy Demo1:newsletter/2024 ./my_downloads/2024
    

  2. Download a file from ecBox site (remote)

     rclone copy Demo1:newsletter/81666-newsletter-no-184-summer-2025.pdf ./my_downloads/
    
     ls my_downloads/
    81666-newsletter-no-184-summer-2025.pdf
    

  3. Download several files matching a pattern from ecBox site (remote)

     rclone copy Demo1: ./my_downloads/matched_pdfs --include "*.pdf"
    
     tree my_downloads/matched_pdfs/
    my_downloads/matched_pdfs/
    ├── assessment-of-the-arctic-weather-satellite-in-nwp.pdf
    ├── ifs
       └── 81623-ifs-documentation-cy49r1-part-i-observations.pdf
    └── newsletter
        ├── 2024
           └── 81618-ifs-upgrade-improves-near-surface-wind-and-temperature-forecasts.pdf
        └── 81666-newsletter-no-184-summer-2025.pdf
    
    3 directories, 4 files
    

Delete

  1. Delete a folder from ecBox site (remote)
     rclone purge Demo1:all_pdfs
    

Warning

Never run rclone purge <destination>: as this will remove the entire ecBox site

  1. Delete a file from ecBox site (remote)

     rclone delete Demo1:all_pdfs/81623-ifs-documentation-cy49r1-part-i-observations.pdf
    

  2. Delete several files matching a pattern from ecBox site (remote)

     rclone delete Demo1: --include "*.pdf"