Skip to content

Commit bc2d571

Browse files
committed
feat(rustic): add it
1 parent 968a53f commit bc2d571

4 files changed

Lines changed: 34 additions & 0 deletions

File tree

000-rustic/compose.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: "3.5"
2+
services:
3+
rustic:
4+
build:
5+
context: ./rustic
6+
volumes:
7+
- ./config.toml:/etc/rustic/rustic.toml:ro
8+
restart: unless-stopped

000-rustic/config.toml.tmpl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[repository]
2+
repository = "opendal:gdrive"
3+
refresh_token = "$RUSTIC_GDRIVE_OAUTH_REFRESH_TOKEN"
4+
client_id = "$RUSTIC_GDRIVE_OAUTH_CLIENT_ID"
5+
client_secret = "$RUSTIC_GDRIVE_OAUTH_CLIENT_SECRET"
6+
password = "$RUSTIC_PASSWORD"
7+
8+
[forget]
9+
keep-daily = 14
10+
keep-weekly = 5
11+
12+
[[backup.snapshots]]
13+
label = "riccia"
14+
sources = ["/srv/riccia"]
15+
git-ignore = true

000-rustic/prepare.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
envsubst \
6+
<"config.toml.tmpl" \
7+
>"config.toml"

000-rustic/rustic/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
FROM ghcr.io/rustic-rs/rustic:latest as upstream
2+
FROM alpine:3.21
3+
COPY --from=upstream /rustic /usr/local/bin/rustic
4+
CMD ["/bin/sleep", "infinity"]

0 commit comments

Comments
 (0)