Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add opendal services #90

Merged
merged 3 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
- [Configuration File](./commands/init/configuration_file.md)
- [Local Backend](./commands/init/local.md)
- [REST Server](./commands/init/rest.md)
- [Other Services via rclone](./commands/init/rclone.md)
- [Supported Services](./commands/init/services.md)
- [Other Services via rclone](./commands/init/rclone.md)
- [Cold Storage](./commands/init/cold_storage.md)
- [Backing up data](./commands/backup/intro.md)
- [Creating snapshots](./commands/backup/creating_snapshots.md)
Expand Down
6 changes: 3 additions & 3 deletions src/commands/init/rclone.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ $ rclone ls b2prod:yggdrasil/foo/bar/baz
448 bar/baz/keys/4bf9c78049de689d73a56ed0546f83b8416795295cda12ec7fb9465af3900b44
```

Rclone can be `configured with environment variables`_, so for instance
configuring a bandwidth limit for rclone can be achieved by setting the
`RCLONE_BWLIMIT` environment variable:
Rclone can be configured with environment variables prefixed by `RCLONE_`, so
for instance configuring a bandwidth limit for rclone can be achieved by setting
the `RCLONE_BWLIMIT` environment variable:
aawsome marked this conversation as resolved.
Show resolved Hide resolved

```console
export RCLONE_BWLIMIT=1M
Expand Down
58 changes: 58 additions & 0 deletions src/commands/init/services.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Supported Services

rustic integrates `opendal`, a data access layer for many different services.
The following services are supported:

| Service Name | Postfix |
| ----------------------------- | ---------- |
| Backblaze B2 | `b2` |
| SFTP | `sftp` |
| OpenStack Swift | `swift` |
| Azure Blob Storage | `azblob` |
| Azure Data Lake Storage Gen2 | `azdls` |
| Azure File Storage | `azfile` |
| Tencent Cloud Object Storage | `cos` |
| Local Filesystem | `fs` |
| FTP | `ftp` |
| Dropbox | `dropbox` |
| Google Drive | `gdrive` |
| Google Cloud Storage | `gcs` |
| GitHub Actions Cache | `ghac` |
| HTTP | `http` |
| IPFS based on IPFS MFS API | `ipmfs` |
| In-memory storage | `memory` |
| Huawei Cloud OBS | `obs` |
| Microsoft OneDrive | `onedrive` |
| Aliyun Object Storage Service | `oss` |
| Amazon S3 | `s3` |
| WebDAV | `webdav` |
| WebHDFS | `webhdfs` |

## Configuration

The configuration for the services is done via the `rustic` configuration file.

For example, to configure the `Amazon S3` service, you would add the following
to the configuration file:

```toml
[repository]
repository = "opendal:s3"
password = "password"

# Other options can be given here - note that opendal also support reading config from env
# files or AWS config dirs, see the opendal S3 docs for more information
# https://opendal.apache.org/docs/rust/opendal/services/struct.S3.html
[repository.options]
access_key_id = "xxx" # this can be ommited, when AWS config is used
secret_access_key = "xxx" # this can be ommited, when AWS config is used
bucket = "bucket_name"
root = "/path/to/repo"
```

`opendal` is used to access the services. The `s3` postfix is used to specify
the `Amazon S3` service. For other services, the postfix is replaced with the
respective service postfix.

You can find more service templates in the
[rustic repository](https://github.com/rustic-rs/rustic/tree/main/config).