| Crates.io | restic-115 |
| lib.rs | restic-115 |
| version | 0.2.2 |
| created_at | 2026-01-16 00:40:26.327047+00 |
| updated_at | 2026-01-25 01:12:37.1582+00 |
| description | Restic REST backend server for 115 Open Platform storage. |
| homepage | |
| repository | https://github.com/gaoyifan/restic-115 |
| max_upload_size | |
| id | 2047458 |
| size | 358,584 |
Restic REST backend server backed by 115 Open Platform cloud storage. It implements the restic REST v2 API over HTTP and maps repository objects to 115 directories/files, with a local SQLite cache to keep listings and IDs fast across restarts.
export OPEN115_ACCESS_TOKEN=...
export OPEN115_REFRESH_TOKEN=...
export OPEN115_REPO_PATH=/restic-backup
export LISTEN_ADDR=127.0.0.1:8000
cargo run --release
export RESTIC_PASSWORD=your-password
restic -r rest:http://127.0.0.1:8000/ init
All options are available as CLI flags and environment variables.
OPEN115_ACCESS_TOKEN (--access-token): Bearer token for proapi.115.com.OPEN115_REFRESH_TOKEN (--refresh-token): Refresh token for passportapi.115.com.OPEN115_REPO_PATH (--repo-path): Repository root path on 115. Default: /restic-backup.LISTEN_ADDR (--listen-addr): Server listen address. Default: 127.0.0.1:8000.RUST_LOG (--log-level): Log level. Default: info.OPEN115_API_BASE (--api-base): 115 Open Platform API base URL. Default: https://proapi.115.com.OPEN115_USER_AGENT (--user-agent): User agent for 115 API calls. Default: restic-115.OPEN115_CALLBACK_SERVER (--callback-server): Callback server hint (documentation only).OPEN115_FORCE_CACHE_REBUILD (--force-cache-rebuild): Force cache warm-up on startup.DB_PATH (--db-path): SQLite DB path. Default: cache-115.db.On startup the server checks the SQLite cache. If it is empty (or OPEN115_FORCE_CACHE_REBUILD=true), it warms the cache by listing the repository root, the standard restic directories, and all data/xx subdirectories. The cache is updated on uploads and deletes to keep restic requests fast and avoid extra API listing calls.
Build and run with Docker Compose:
export OPEN115_ACCESS_TOKEN=...
export OPEN115_REFRESH_TOKEN=...
export OPEN115_REPO_PATH=/restic-backup
docker compose up --build
The container stores the cache DB at ./cache/cache-115.db via the volume in docker-compose.yml.
POST /?create=true initializes the repository directories.DELETE / returns 501 Not Implemented (repository deletion is not implemented).GET/HEAD/POST /config operates on the restic config object.GET/HEAD/POST/DELETE /:type/:name handles restic objects by type (data, index, snapshots, keys, locks).Tests that touch the real 115 API and restic CLI require credentials:
export OPEN115_ACCESS_TOKEN=...
export OPEN115_REFRESH_TOKEN=...
cargo test --tests
End-to-end tests also require restic in PATH.
MIT