If you want to upload a large number of files or files in a folder via OpenStack Swift API then you can install and use the rclone.
- The first step is to install the rclone in your system. For installation, you can refer to this link – Click here
- Once rclone is installed, you need to configure the remote. You can execute the command
rclone config
- Click “n” for creating a new remote. After that, you need to provide the following details. You will get the details from the RC file downloaded from the console.
No remotes found - make a new one n) New remote s) Set configuration password q) Quit config n/s/q> n name> remote Type of storage to configure. Choose a number from below, or type in your own value [snip] XX / OpenStack Swift (Rackspace Cloud Files, Memset Memstore, OVH) "swift" [snip] Storage> swift Get swift credentials from environment variables in standard OpenStack form. Choose a number from below, or type in your own value 1 / Enter swift credentials in the next step "false" 2 / Get swift credentials from environment vars. Leave other fields blank if using this. "true" env_auth> true User name to log in (OS_USERNAME). user> API key or password (OS_PASSWORD). key> Authentication URL for server (OS_AUTH_URL). Choose a number from below, or type in your own value 1 / Rackspace US "https://auth.api.rackspacecloud.com/v1.0" 2 / Rackspace UK "https://lon.auth.api.rackspacecloud.com/v1.0" 3 / Rackspace v2 "https://identity.api.rackspacecloud.com/v2.0" 4 / Memset Memstore UK "https://auth.storage.memset.com/v1.0" 5 / Memset Memstore UK v2 "https://auth.storage.memset.com/v2.0" 6 / OVH "https://auth.cloud.ovh.net/v3" auth> User ID to log in - optional - most swift systems use user and leave this blank (v3 auth) (OS_USER_ID). user_id> User domain - optional (v3 auth) (OS_USER_DOMAIN_NAME) domain> Tenant name - optional for v1 auth, this or tenant_id required otherwise (OS_TENANT_NAME or OS_PROJECT_NAME) tenant> Tenant ID - optional for v1 auth, this or tenant required otherwise (OS_TENANT_ID) tenant_id> Tenant domain - optional (v3 auth) (OS_PROJECT_DOMAIN_NAME) tenant_domain> Region name - optional (OS_REGION_NAME) region> Storage URL - optional (OS_STORAGE_URL) storage_url> Auth Token from alternate authentication - optional (OS_AUTH_TOKEN) auth_token> AuthVersion - optional - set to (1,2,3) if your auth URL has no version (ST_AUTH_VERSION) auth_version> Endpoint type to choose from the service catalogue (OS_ENDPOINT_TYPE) Choose a number from below, or type in your own value 1 / Public (default, choose this if not sure) "public" 2 / Internal (use internal service net) "internal" 3 / Admin "admin" endpoint_type> Remote config -------------------- [test] env_auth = true user = key = auth = user_id = domain = tenant = tenant_id = tenant_domain = region = storage_url = auth_token = auth_version = endpoint_type = -------------------- y) Yes this is OK e) Edit this remote d) Delete this remote y/e/d> y
For further details, you can refer to this link
- To list all containers
rclone lsd remote:
- To create a new container
rclone mkdir remote:container
- To upload files to OpenStack. Click here for more info
rclone copy source:sourcepath dest:destpath
- You also check the other commands for various operations. Click here