Operations

How can I back up the OS drive of a SwiftStack node?

The SwiftStack controller keeps backups of your nodes' configuration files so that you don't have to. If a node's operating system drive fails, you can rebuild it and push the configuration to a rebuilt node. If you still want to keep your own backups, you need to back up /etc/swift/ and /opt/ss/.

Is there a list of Swift commands I can use with my cluster?

Sure! If you want to get information about accounts, containers and objects in your cluster or just upload, download or delete files (objects), you can install the Swift Command Line Client on your computer.

Alternatively, you can use curl; Swift's API reference has a chapter on how to use cURL with Swift.

See python-swiftclient for how to install the Swift Command Line Client.

Once you have the Swift Command Line Client installed, you can use it to connect to your cluster.

In the examples below, Cluster API IP address is 192.168.1.10, the User is user and the Key is password.

Check status of cluster (need to be superuser):

$ swift -A http://192.168.1.10/auth/v1.0 -U user -K password stat

List all items in a container called photos:

$ swift -A http://192.168.1.10/auth/v1.0 -U user -K password list photos

List available containers in an account:

$ swift -A http://192.168.1.10/auth/v1.0 -U user -K password list

Create a container called 'documents':

$ swift -A http://192.168.1.10/auth/v1.0 -U user -K password post documents

Upload the file 'test.txt' to the 'documents' container:

$ swift -A http://192.168.1.10/auth/v1.0 -U user -K password upload documents test.txt

Download the 'image.jpg' file from the 'photos' container:

$ swift -A http://192.168.1.10/auth/v1.0 -U user -K password download photos image.jpg

Delete the file 'test.txt' from a container called 'documents':

$ swift -A http://192.168.1.10/auth/v1.0 -U user -K password delete documents test.txt