Rclone
Come utilizzare Rclone per eseguire il backup dei dati su Cubbit
Segui le istruzioni dei prossimi paragrafi per imparare a configurare Rclone ed eseguire un backup sul tuo account Cubbit.
Questa guida si riferisce alla versione v1.61.1 di Rclone.
Le opzioni di rclone elencate di seguito possono variare a seconda della versione utilizzata.
Prerequisiti
Innanzitutto, devi ottenere le tue access key e secret key. Puoi ottenere questi segreti dalla Cubbit web Console. Segui queste istruzioni per generare le chiavi.
Installazione
Esistono diversi modi per installare Rclone. Segui le istruzioni direttamente sul sito ufficiale.
Configurazione
Le seguenti istruzioni dovrebbero funzionare su qualsiasi macchina UNIX in grado di eseguire Rclone.
Per qualsiasi dubbio, è possibile consultare la guida ufficiale alla configurazione.
Una volta installato, dovresti essere in grado di eseguire il comando per aggiungere una configurazione.
rclone config
Verrà avviata una sessione interattiva per guidarti attraverso il processo di configurazione di un remote.
Premi n
per creare un nuovo remote:
No remotes found, make a new one?
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n
Enter name for new remote.
name> cubbit
Quindi è necessario scegliere a quale memoria si connetterà il remote.
Poiché Cubbit utilizza il protocollo S3, premi 5
per selezionare l'opzione di archiviazione generica S3.
Quindi, premi 25
per scegliere il fornitore generico.
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)
storage> 5
provider> 25
Quindi, configura il metodo di autenticazione.
Premi 1
per salvare le credenziali con la configurazione.
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.
Choose a number from below, or type in your own boolean value (true or false).
Press Enter for the default (false).
1 / Enter AWS credentials in the next step.
\ (false)
2 / Get AWS credentials from the environment (env vars or IAM).
\ (true)
env_auth> 1
Inserisci qui l'access key.
Option access_key_id.
AWS Access Key ID.
Leave blank for anonymous access or runtime credentials.
Enter a value. Press Enter to leave empty.
access_key_id> ******************
e qui la secret key.
Option secret_access_key.
AWS Secret Access Key (password).
Leave blank for anonymous access or runtime credentials.
Enter a value. Press Enter to leave empty.
secret_access_key> ******************
Non configurare la regione, premi enter
.
Option region.
Region to connect to.
Leave blank if you are using an S3 clone and you don't have a region.
Choose a number from below, or type in your own value.
Press Enter to leave empty.
/ Use this if unsure.
1 | Will use v4 signatures and an empty region.
\ ()
/ Use this only if v4 signatures don't work.
2 | E.g. pre Jewel/v10 CEPH.
\ (other-v2-signature)
region>
Configura l'endpoint di Cubbit.
Option endpoint.
Endpoint for S3 API.
Required when using an S3 clone.
Enter a value. Press Enter to leave empty.
endpoint> https://s3.cubbit.eu
Non impostare il location_constraint, premi Invio
.
Option location_constraint.
Location constraint - must be set to match the Region.
Leave blank if not sure. Used when creating buckets only.
Enter a value. Press Enter to leave empty.
location_constraint>
Quindi è possibile configurare le ACL predefinite.
Scegliamo 1
.
Option acl.
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)
acl> 1
A meno che tu non voglia vedere la configurazione avanzata, premi n
.
Edit advanced config?
y) Yes
n) No (default)
y/n> n
... y
, e abbiamo finito!
Configuration complete.
Options:
- type: s3
- provider: Other
- access_key_id: <access_key_id>
- secret_access_key: <secret_access_key>
- endpoint: https://s3.cubbit.eu
- acl: private
Keep this "cubbit" remote?
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d> y
Come usare rclone
La seguente operazione presuppone che tu abbia già creato un bucket chiamato bucket-name
sul tuo account.
List files
rclone ls cubbit:bucket-name
Sync folder
rclone sync -P ./backup-folder cubbit:bucket-name