Rclone

Siehe auch

Links:

Installation:

# from epel-repo
dnf -y install rclone

Konfiguration - entweder interaktiv:

rclone config
# name> infomaniak
# ...

Oder per Config-File - hier am Beispiel eines Swift-based Swiss Backups bei Infomaniak:

~/.config/rclone/rclone.conf
[infomaniak_swissbackup]
type = swift
user = SBI-XXXXXXXX
key = password
auth = https://swiss-backup02.infomaniak.com/identity/v3
domain = default
tenant = sb_project_SBI-XXXXXXXX
tenant_domain = default
region = RegionOne
storage_url =
auth_version =

Verwendung:

# list containers / buckets
rclone lsd infomaniak_swissbackup:

# list content of container
rclone ls infomaniak_swissbackup:mycontainer

# list content of container with additional info (slower)
rclone lsl infomaniak_swissbackup:mycontainer

Mounting:

# 1st terminal window: mount (foreground) dnf -y install fuse mkdir /mnt/infomaniak_swissbackup rclone mount infomaniak_swissbackup: /mnt/infomaniak_swissbackup

# 2nd terminal window: ls /mnt/infomaniak_swissbackup

Web GUI (https://rclone.org/gui/):

rclone rcd --rc-web-gui --rc-no-auth
# http://localhost:5572

Dateien hin zu OpenStack Swift synchronisieren:

~/.config/rclone/rclone.conf
[myproject]
type = swift
user = PCU-XXXXXXXX
key = password
auth = https://api.pub1.infomaniak.cloud/identity/v3
domain = Default
tenant = PCP-XXXXXXXX
tenant_domain = default
region = dc3-a
storage_url =
Alternatively with the Openstack RC file
# remote named "myproject"
export RCLONE_CONFIG_MYPROJECT_TYPE=swift
export RCLONE_CONFIG_MYPROJECT_ENV_AUTH=true

source path/to/openstack.rc
rclone ls myproject:mybucket
rclone mkdir myproject:mybucket
rclone sync path/to/folder myproject:/mybucket

rclone Cheat Sheet

Usage:
  rclone [flags]
  rclone [command]

Available Commands:
  about           Get quota information from the remote.
  authorize       Remote authorization.
  backend         Run a backend specific command.
  cat             Concatenates any files and sends them to stdout.
  check           Checks the files in the source and destination match.
  checksum        Checks the files in the source against a SUM file.
  cleanup         Clean up the remote if possible.
  completion      generate the autocompletion script for the specified shell
  config          Enter an interactive configuration session.
  copy            Copy files from source to dest, skipping identical files.
  copyto          Copy files from source to dest, skipping identical files.
  copyurl         Copy url content to dest.
  cryptcheck      Cryptcheck checks the integrity of a crypted remote.
  cryptdecode     Cryptdecode returns unencrypted file names.
  dedupe          Interactively find duplicate filenames and delete/rename them.
  delete          Remove the files in path.
  deletefile      Remove a single file from remote.
  genautocomplete Output completion script for a given shell.
  gendocs         Output markdown docs for rclone to the directory supplied.
  hashsum         Produces a hashsum file for all the objects in the path.
  help            Show help for rclone commands, flags and backends.
  link            Generate public link to file/folder.
  listremotes     List all the remotes in the config file.
  ls              List the objects in the path with size and path.
  lsd             List all directories/containers/buckets in the path.
  lsf             List directories and objects in remote:path formatted for parsing.
  lsjson          List directories and objects in the path in JSON format.
  lsl             List the objects in path with modification time, size and path.
  md5sum          Produces an md5sum file for all the objects in the path.
  mkdir           Make the path if it doesn't already exist.
  mount           Mount the remote as file system on a mountpoint.
  move            Move files from source to dest.
  moveto          Move file or directory from source to dest.
  ncdu            Explore a remote with a text based user interface.
  obscure         Obscure password for use in the rclone config file.
  purge           Remove the path and all of its contents.
  rc              Run a command against a running rclone.
  rcat            Copies standard input to file on remote.
  rcd             Run rclone listening to remote control commands only.
  rmdir           Remove the empty directory at path.
  rmdirs          Remove empty directories under the path.
  selfupdate      Update the rclone binary.
  serve           Serve a remote over a protocol.
  settier         Changes storage class/tier of objects in remote.
  sha1sum         Produces an sha1sum file for all the objects in the path.
  size            Prints the total size and number of objects in remote:path.
  sync            Make source and dest identical, modifying destination only.
  test            Run a test command
  touch           Create new file or change file modification time.
  tree            List the contents of the remote in a tree like fashion.
  version         Show the version number.

Use "rclone [command] --help" for more information about a command.
Use "rclone help flags" for to see the global flags.
Use "rclone help backends" for a list of supported services.

Troubleshooting

Failed to create file system for "infomaniak_pubcloud:": Can't find AuthVersion in AuthUrl - set explicitly

auth in der rclone.conf bzw. OS_AUTH_URL in dem Openstack RC File muss mit /v3 enden, z.B. auth = https://api.pub1.infomaniak.cloud/identity/v3

Built on 2024-11-18