Usar rclone con DreamObjects

Generalidades

Este artículo explica cómo configurar rclone para usarlo con DreamObjects.

Antecedentes

Rclone es una herramienta similar a rsync para Windows, Mac OS, Linux y otros sistemas operativos, diseñada para el almacenamiento en la nube, como DreamObjects.

Incluye las siguientes herramientas:

  • Verificación de hashes MD5/SHA1 en todo momento para la integridad de los archivos
  • Marcas de tiempo conservadas en los archivos
  • Sincronizaciones parciales soportadas por archivo completo
  • Modo de copia para copiar solo archivos nuevos o modificados
  • Modo de sincronización (en un sentido) para hacer que un directorio sea idéntico
  • Modo de verificación para comprobar la igualdad de los hashes de los archivos
  • Puede sincronizar hacia y desde la red, p. ej., dos cuentas de nube diferentes
  • Cifrado opcional (Crypt)
  • Montaje FUSE opcional (rclone mount)

¿Cómo configurar rclone con DreamObjects?

Lo siguiente configura un nuevo perfil remoto de rclone.

  1. Descarga e instala rclone según el sistema operativo de tu computador. Puedes descargarlo desde el sitio de rclone aquí:
  2. Navega al directorio donde se descargó el archivo. (Nota: en Windows puedes navegar al directorio /Downloads y extraer los archivos de rclone.) 
  3. Copia el directorio en la barra del Explorador.
  4. Abre el símbolo del sistema y navega al directorio donde se extrajeron los archivos.
  5. En tu terminal o símbolo del sistema, corre lo siguiente para comenzar a configurar rclone usando la herramienta de configuración interactiva:

    [user@localhost]$ rclone config
    No remotes found - make a new one
    n) New remote
    s) Set configuration password
    q) Quit config
    n/s/q> n
  6. Ingresa n para configurar un nuevo perfil de configuración (es decir, un remoto).

    name > dreamobjects
  7. Elige un nombre que quieras asignar a esta conexión. Este ejemplo usa el nombre dreamobjects.

    Type of storage to configure.
    Enter a string value. Press Enter for the default ("").
    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 S3 Compliant Storage Providers including AWS, Alibaba, ArvanCloud, Ceph, ChinaMobile, Cloudflare, DigitalOcean, Dreamhost, GCS, HuaweiOBS, IBMCOS, IDrive, IONOS, LyveCloud, Leviia, Liara, Linode, Magalu, Minio, Netease, Outscale, Petabox, RackCorp, Rclone, Scaleway, SeaweedFS, Selectel, StackPath, Storj, Synology, TencentCOS, Wasabi, Qiniu and others
    \ (s3)
    5 / Backblaze B2
    \ (b2)
    [...]
    Storage> 4
  8. Selecciona la opción 4 para Amazon S3.

    Choose your S3 provider.
    Enter a string value. Press Enter for the default ("").
    Choose a number from below, or type in your own value
    1 / Amazon Web Services (AWS) S3
    \ (AWS)
    2 / Alibaba Cloud Object Storage System (OSS) formerly Aliyun
    \ (Alibaba)
    3 / Arvan Cloud Object Storage (AOS)
    \ (ArvanCloud)
    4 / Ceph Object Storage
    \ (Ceph)
    5 / China Mobile Ecloud Elastic Object Storage (EOS)
    \ (ChinaMobile)
    6 / Cloudflare R2 Storage
    \ (Cloudflare)
    7 / DigitalOcean Spaces
    \ (DigitalOcean)
    8 / Dreamhost DreamObjects
    \ (Dreamhost)
    9 / Google Cloud Storage
    \ (GCS)
    [...]
    provider> 8
  9. Selecciona la opción 8 para DreamHost.

    Option env_auth.
    Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars).
    Only applies if access_key_id and secret_access_key is blank.
    Enter a boolean value (true or false). Press Enter for the default ("false").
    Choose a number from below, or type in your own value
     1 / Enter AWS credentials in the next step
       \ "false"
     2 / Get AWS credentials from the environment (env vars or IAM)
       \ "true"
    env_auth> 1
  10. Selecciona la opción 1 para ingresar las credenciales de AWS.

    AWS Access Key ID.
    Leave blank for anonymous access or runtime credentials.
    Enter a string value. Press Enter for the default ("").
    access_key_id> YOUR_ACCESS_KEY
    AWS Secret Access Key (password)
    Leave blank for anonymous access or runtime credentials.
    Enter a string value. Press Enter for the default ("").
    secret_access_key> YOUR_SECRET_KEY
  11. Reemplaza YOUR_ACCESS_KEY y YOUR_SECRET_KEY por tu Llave de Acceso real y su Llave Secreta correspondiente. Estas se pueden ubicar en la página de DreamObjects.

    Option region.
    Region to connect to.
    Leave blank if you are using an S3 clone and you don't have a region.
    Enter a string value. Press Enter for the default ("").
    Choose a number from below, or type in your own value
     1 / Use this if unsure. Will use v4 signatures and an empty region.
     \ ""
     2 / Use this only if v4 signatures don't work, eg pre Jewel/v10 CEPH.
     \ "other-v2-signature"
    region> us-east-005
  12. Ingresa tu región de DreamObjects us-east-005 y presiona Enter para continuar.

    Endpoint for S3 API.
    Required when using an S3 clone.
    Enter a string value. Press Enter for the default ("").
    Choose a number from below, or type in your own value
     1 / Dream Objects endpoint
     \ "objects-us-west-1.dream.io"
    endpoint> s3.us-east-005.dream.io
  13. Ingresa el nombre de host de DreamObjects s3.us-east-005.dream.io y presiona Enter para continuar.

    Location constraint - must be set to match the Region.
    Leave blank if not sure. Used when creating buckets only.
    Enter a string value. Press Enter for the default ("").
    location_constraint>
  14. Deja esta opción en blanco y presiona Enter para continuar.

    Canned ACL used when creating buckets and storing or copying objects.
    
    This ACL is used for creating objects and if bucket_acl isn't set, for creating buckets too.
    For more info visit https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl
    Note that this ACL is applied when server-side copying objects as S3
    doesn't copy the ACL from the source but rather writes a fresh one.
    If the acl is an empty string then no X-Amz-Acl: header is added and
    the default (private) will be used.
    Choose a number from below, or type in your own value.
    Press Enter to leave empty.
    / Owner gets FULL_CONTROL.
    1 | No one else has access rights (default).
    \ (private)
    / Owner gets FULL_CONTROL.
    2 | The AllUsers group gets READ access.
    \ (public-read)
    / Owner gets FULL_CONTROL.
    [...]
    acl> private
  15. Establece la ACL predefinida según cómo quieras usar rclone. Este ejemplo usa private.

    Edit advanced config? (y/n)
    y) Yes
    n) No
    y/n> n
  16. Elige si quieres editar la configuración avanzada. Este ejemplo elige no hacerlo.

    Configuration complete.
    Options:
    - type: s3
    - provider: Dreamhost
    - access_key_id: YOUR_ACCESS_KEY
    - secret_access_key: YOUR_SECRET_KEY
    - region: us-east-005
    - endpoint: s3.us-east-005.dream.io
    - acl: private
    Keep this "dreamobjects" remote?
    y) Yes this is OK (default)
    e) Edit this remote
    d) Delete this remote
    y/e/d> y
  17. Escribe y.
  18. Revisa el remoto que configuraste. Si todo se ve correcto, guárdalo ingresando y y sal del asistente de configuración ingresando q.

    Current remotes:
    
    Name                 Type
    ====                 ====
    dreamobjects         s3
    
    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

¿Cómo usar rclone con DreamObjects?

Revisa la siguiente página de Rclone para ver una lista de comandos que puedes usar con esta herramienta. Estos son algunos ejemplos:

Muestra los buckets:

[user@localhost]$ rclone lsd dreamobjects:
          -1 2024-03-29 02:19:25        -1 samplebucket
          -1 2024-03-29 22:06:53        -1 anotherbucket
          -1 2024-03-29 21:33:25        -1 greatbucket

Crea un nuevo bucket:

[user@localhost]$ rclone mkdir dreamobjects:mynewbucket

Sincroniza /home/localuser/directory con el bucket remoto, eliminando cualquier archivo sobrante en el bucket:

[user@localhost]$ rclone sync /home/localuser/directory dreamobjects:mynewbucket

Muestra el contenido de un bucket:

[user@localhost]$ rclone ls dreamobjects:mynewbucket

Para más ejemplos sobre cómo usar el software, revisa la documentación oficial de rclone.

Ver también

¿Este artículo ha respondido sus preguntas?

Última actualización el PST.

¿Aún no encuentra lo que busca?