> For the complete documentation index, see [llms.txt](https://docs.weka.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.weka.io/weka-filesystems-and-object-stores/attaching-detaching-object-stores-to-from-filesystems/attaching-detaching-object-stores-to-from-filesystems-1.md).

# Attach or detach object store buckets using the CLI

Attach or detach object store buckets for filesystems using the CLI.

## Attach an object store bucket to a filesystem

Attaches a filesystem to an existing object store bucket so the filesystem can tier data to it.

**Command:** `weka fs tier s3 attach`

```sh
weka fs tier s3 attach <filesystem> <obs-name> [--mode <obs-attach-mode>]
```

**Parameters**

| Parameter                   | Description                                 |
| --------------------------- | ------------------------------------------- |
| `filesystem`\*              | Name of the filesystem.                     |
| `obs-name`\*                | Name of the object store bucket to attach.  |
| `--mode` \<obs-attach-mode> | Operation mode for the object store bucket. |

## Detach an object store bucket from a filesystem

Detaches a filesystem from an object store bucket.

**Command:** `weka fs tier s3 detach`

```sh
weka fs tier s3 detach <filesystem> <obs-name> [--force]
```

**Parameters**

| Parameter       | Description                                                     |
| --------------- | --------------------------------------------------------------- |
| `filesystem`\*  | Name of the filesystem.                                         |
| `obs-name`\*    | Name of the object store bucket to detach.                      |
| `-f`, `--force` | Force action. Perform this action without further confirmation. |

{% hint style="info" %}
To [recover from a snapshot](/weka-filesystems-and-object-stores/snap-to-obj/snap-to-obj-1.md#create-a-filesystem-from-a-local-uploaded-snapshot) uploaded when two `local` object stores have been attached, use the `--additional-obs` parameter in the `weka fs download` command. The primary object store should be the one where the locator has been uploaded to
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.weka.io/weka-filesystems-and-object-stores/attaching-detaching-object-stores-to-from-filesystems/attaching-detaching-object-stores-to-from-filesystems-1.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
