Skip to content

Commit 48b20a6

Browse files
simonsanaawsome
andauthored
docs: add opendal services (#90)
Add basic service documentation for using opendal. Ref.: rustic-rs/rustic#1278 --------- Signed-off-by: simonsan <[email protected]> Co-authored-by: Alexander Weiss <[email protected]>
1 parent ff43adf commit 48b20a6

File tree

3 files changed

+75
-4
lines changed

3 files changed

+75
-4
lines changed

src/SUMMARY.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
- [Configuration File](./commands/init/configuration_file.md)
1414
- [Local Backend](./commands/init/local.md)
1515
- [REST Server](./commands/init/rest.md)
16-
- [Other Services via rclone](./commands/init/rclone.md)
16+
- [Supported Services](./commands/init/services.md)
17+
- [Other Services via rclone](./commands/init/rclone.md)
1718
- [Cold Storage](./commands/init/cold_storage.md)
1819
- [Backing up data](./commands/backup/intro.md)
1920
- [Creating snapshots](./commands/backup/creating_snapshots.md)

src/commands/init/rclone.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,20 @@ $ rclone ls b2prod:yggdrasil/foo/bar/baz
4444
448 bar/baz/keys/4bf9c78049de689d73a56ed0546f83b8416795295cda12ec7fb9465af3900b44
4545
```
4646

47-
Rclone can be `configured with environment variables`_, so for instance
48-
configuring a bandwidth limit for rclone can be achieved by setting the
49-
`RCLONE_BWLIMIT` environment variable:
47+
Rclone can be configured with environment variables prefixed by `RCLONE_`, so
48+
for instance configuring a bandwidth limit for rclone can be achieved by setting
49+
the `RCLONE_BWLIMIT` environment variable:
5050

5151
```console
5252
export RCLONE_BWLIMIT=1M
5353
```
5454

55+
As rustic allows to set environment variables in the config profile, you can
56+
alternatively use:
57+
58+
```toml
59+
[global.env]
60+
RCLONE_BWLIMIT = "1M"
61+
```
62+
5563
For debugging rclone, you can set the environment variable `RCLONE_VERBOSE=2`.

src/commands/init/services.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Supported Services
2+
3+
rustic integrates `opendal`, a data access layer for many different services.
4+
The following services are supported:
5+
6+
| Service Name | Postfix |
7+
| ----------------------------- | ---------- |
8+
| Backblaze B2 | `b2` |
9+
| SFTP | `sftp` |
10+
| OpenStack Swift | `swift` |
11+
| Azure Blob Storage | `azblob` |
12+
| Azure Data Lake Storage Gen2 | `azdls` |
13+
| Azure File Storage | `azfile` |
14+
| Tencent Cloud Object Storage | `cos` |
15+
| Local Filesystem | `fs` |
16+
| FTP | `ftp` |
17+
| Dropbox | `dropbox` |
18+
| Google Drive | `gdrive` |
19+
| Google Cloud Storage | `gcs` |
20+
| GitHub Actions Cache | `ghac` |
21+
| HTTP | `http` |
22+
| IPFS based on IPFS MFS API | `ipmfs` |
23+
| In-memory storage | `memory` |
24+
| Huawei Cloud OBS | `obs` |
25+
| Microsoft OneDrive | `onedrive` |
26+
| Aliyun Object Storage Service | `oss` |
27+
| Amazon S3 | `s3` |
28+
| WebDAV | `webdav` |
29+
| WebHDFS | `webhdfs` |
30+
31+
## Configuration
32+
33+
The configuration for the services is done via the `rustic` configuration file.
34+
35+
For example, to configure the `Amazon S3` service, you would add the following
36+
to the configuration file:
37+
38+
```toml
39+
[repository]
40+
repository = "opendal:s3"
41+
password = "password"
42+
43+
# Other options can be given here - note that opendal also support reading config from env
44+
# files or AWS config dirs, see the opendal S3 docs for more information
45+
# https://opendal.apache.org/docs/rust/opendal/services/struct.S3.html
46+
[repository.options]
47+
access_key_id = "xxx" # this can be ommited, when AWS config is used
48+
secret_access_key = "xxx" # this can be ommited, when AWS config is used
49+
bucket = "bucket_name"
50+
root = "/path/to/repo"
51+
```
52+
53+
`opendal` is used to access the services. The `s3` postfix is used to specify
54+
the `Amazon S3` service. For other services, the postfix is replaced with the
55+
respective service postfix.
56+
57+
You can find more service templates in the
58+
[rustic repository](https://github.com/rustic-rs/rustic/tree/main/config).
59+
60+
To see the service-dependent options to be set in `[repository.options]`, please
61+
refer to the
62+
[opendal service documentation](https://opendal.apache.org/docs/rust/opendal/services/).

0 commit comments

Comments
 (0)