> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tape.network/llms.txt
> Use this file to discover all available pages before exploring further.

# Rclone

[rclone](https://rclone.org) is a command-line tool for copying and syncing files between your machine and cloud storage. Its S3 backend works against a Tapedrive bucket with a stock remote.

## Before you start

You need a bucket and a credential. A bucket is a tape that has delegated writes to the gateway, and a credential is an access key pair the gateway operator issues you. [Set up a bucket](/tools/s3-gateway#set-up-a-bucket) walks through both.

## Configure

Add a remote to your rclone config:

```ini ~/.config/rclone/rclone.conf theme={null}
[tapedrive]
type = s3
provider = Other
access_key_id = TAPE4Q7ZK2M9XH3PD8AW
secret_access_key = mZ9vQ3nL8kR2tW6yB4cX7dF1hJ5pS0aG3uE8iO2q
endpoint = https://s3.example.com
region = solana
```

## Everyday commands

```bash theme={null}
# list your buckets
rclone lsd tapedrive:

# list objects
rclone ls tapedrive:my-bucket

# upload a folder, adding new and changed files
rclone copy ./photos tapedrive:my-bucket/photos

# make the bucket match the folder, deleting what is gone locally
rclone sync ./photos tapedrive:my-bucket/photos

# check that the bucket matches the folder
rclone check --size-only ./photos tapedrive:my-bucket/photos

# download a folder
rclone copy tapedrive:my-bucket/photos ./photos

# print an object
rclone cat tapedrive:my-bucket/photos/notes.txt

# delete an object, or everything under a prefix
rclone delete tapedrive:my-bucket/photos/old.jpg
rclone purge tapedrive:my-bucket/photos/2019
```

rclone returns as soon as the gateway has accepted the files. The writes reach the chain afterwards, about a minute later for a small folder.

## Good to know

* Do not pass `--checksum`. ETags here are not MD5 hashes, so rclone silently compares sizes instead and misses a changed file of the same length.
* `rclone check` compares sizes and warns that hashes could not be checked. That warning is expected.
* rclone re-sends every file on every sync, because the gateway does not store modification times. The gateway ignores unchanged content, so a repeat sync costs nothing on chain.
* `rclone mkdir` reports success but creates nothing. Buckets are created with [`tape create`](/tools/cli/commands/tape-management#create).
* `rclone lsd` shows 1970 as the bucket date, because buckets have no creation date.

## Next

* [Hosting a Static Site](/tools/hosting) for deploying a website.
* [Integrations](/tools/s3-gateway/integrations) for the errors every S3 client shares.
