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ñados para almacenamiento en la nube, como DreamObjects.
Cuenta con:
- Hash MD5/SHA1 comprobado en todo momento para la integridad del archivo.
- Marcas de tiempo conservadas en archivos.
- Sincronizaciones parciales compatibles con archivos completos.
- Modo de copia para copiar archivos nuevos/modificados.
- Modo de sincronización (unidireccional) para hacer un directorio idéntico.
- Modo check para verificar la igualdad de hash del archivo.
- Puede sincronizarse desde y hacia la red, por ejemplo, dos cuentas en la nube diferentes.
- Cifrado opcional (Crypt).
- Montaje FUSE opcional (rclone mount).
Configurar rclone
Lo siguiente configura un perfil remoto nuevo de rclone.
- Descarga e instala rclone según el sistema operativo de tu computador. Puedes descargarlo del sitio de rclone aquí:
- Navega al directorio donde el archivo fue descargado. (NOTA: En Windows, puedes navegar al directorio /Descargas y extraer los archivos rclone).
- Copia el directorio en la barra del Explorador.
- Abre el símbolo del sistema y navegar al directorio en el que se extrajeron los archivos.
-
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
-
Ingresa n para configurar un nuevo perfil de configuración (es decir, un control remoto).
name > dreamobjects -
Elige un nombre que desees 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 -
Selecciona la opción 4 para Amazon S3. 4).
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 -
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 -
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 -
Reemplaza YOUR_ACCESS_KEY y YOUR_SECRET_KEY con tu llave de acceso real y tu llave secreta correspondiente. Estas se pueden encontrar en la página 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 -
Ingresa la región de tu DreamObjectsus-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 -
Ingresa el hostname de DreamObjectss3.us-east-005.dream.io y presiona Entrar 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> -
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 -
Configura la ACL predefinida según cómo desees utilizar rclone. Este ejemplo usa private.
Edit advanced config? (y/n) y) Yes n) No y/n> n -
Elige si deseas 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 - Escribe y. .
-
Revisa el remoto que has configurado. Si todo parece correcto, guárdalo ingresando y y sal del asistente de configuración ingresandoq.
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
Usar rclone
Revisa la siguiente página de Rclone para obtener una lista de comandos que puedes usar con esta herramienta.
Lista de 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
Haz un nuevo bucket:
[user@localhost]$ rclone mkdir dreamobjects:mynewbucket
Sincroniza /home/localuser/directory al bucket remoto, borrando cualquier archivo excedente en el bucket:
[user@localhost]$ rclone sync /home/localuser/directory dreamobjects:mynewbucket
Enumera los contenidos de un bucket:
[user@localhost]$ rclone ls dreamobjects:mynewbucket
Para obtener más ejemplos sobre cómo utilizar el software, revisa la documentación oficial de rclone.
Ver también
- Instalar y configurar AWS CLI
- Comandos de AWS CLI para administrar tus datos de DreamObjects
- Instalar S3cmd
¡Comienza a Almancenar Tus Datos Hoy!