swift
Manage OpenStack Swift object storage
TLDR
Start a REPL (interactive shell)
Execute a program
Start a new project with the package manager
Generate an Xcode project file
Update dependencies
Compile project for release
SYNOPSIS
swift [options] command [parameters]
PARAMETERS
-A
Authentication URL. Required unless environment variables are set.
-U
User name. Required unless environment variables are set.
-K
API key or password. Required unless environment variables are set.
-V
Swift version (1 or 2). Defaults to 1.
-H
Add custom header(s) to the request.
-v
Verbose output.
-q
Quiet output (suppress status messages).
upload
Upload a file or directory to a container.
download
Download an object from a container.
list
List objects in a container.
delete
Delete an object.
post
Update meta data for container.
stat
Show statistics for a container or object.
capabilities
Show server capabilities.
auth
Validate authentication credentials.
DESCRIPTION
The swift command is a command-line interface (CLI) for interacting with OpenStack Swift object storage. It enables users to manage containers and objects within a Swift storage cluster. Key capabilities include creating, listing, updating, and deleting containers and objects, as well as uploading and downloading data. The command supports various authentication methods, including Keystone.
Its main use is for direct interaction with an OpenStack Swift cluster from the command line, for example for managing backups, deploying applications or just accessing objects using scripts.
The command-line options provide a way to configure the connection to the OpenStack Swift service, like authorization URL, user name and password. It can also handle large files by splitting them into segments to overcome limitations in HTTP. The swift tool is indispensable for developers, system administrators, and cloud users who need to manage objects in OpenStack Swift effectively.
The usage requires understanding of object storage concepts like containers and objects, and also the credentials required for authentication and authorization to access OpenStack's Swift service.
CAVEATS
Requires properly configured OpenStack Swift environment and credentials. Incorrect credentials or misconfigured endpoints will result in errors.
Rate limiting on the server side can also lead to unexpected errors.
AUTHENTICATION
The swift command supports multiple authentication methods, including Keystone (Identity service). Using Keystone typically involves setting environment variables like OS_AUTH_URL, OS_USERNAME, OS_PASSWORD, and OS_PROJECT_NAME. Ensure the appropriate Keystone API version is specified if necessary. The environment variables can make usage much more convenient, when you do not need to specify all the parameters on the command line.
LARGE FILE HANDLING
For uploading large files, the swift command automatically segments the file into smaller chunks to overcome HTTP limitations. The threshold for segmentation and the segment size can be configured.
ERROR HANDLING
Pay attention to the error messages produced. They usually include more detailed information about the reason of the failure, including authentication, missing permissions, or connection timeouts.
HISTORY
The swift command was developed as part of the OpenStack project to provide a command-line interface for interacting with the Swift object storage service. It evolved alongside the OpenStack ecosystem, gaining features and improvements to support various authentication methods, large file handling, and integration with other OpenStack components. Its usage has grown with the adoption of OpenStack as a popular cloud platform.
SEE ALSO
radosgw-admin(8), s3cmd(1)