destinations

package
v1.3.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package destinations implements remote backup destination drivers for nSelf's PITR (Point-in-Time Recovery) system.

Remote keys follow rclone's URI scheme:

s3://bucket/path/to/object
r2://bucket/path/to/object
minio://bucket/path/to/object
b2://bucket/path/to/object
gcs://bucket/path/to/object
az://container/path/to/object

The minio:// scheme is an nSelf convention: it is rewritten to a "minio" rclone remote automatically (rclone remote name "minio"). All other schemes are passed through to rclone verbatim (scheme becomes the rclone remote name).

rclone must be installed and configured (rclone.conf or environment variables) before FetchRemote is called.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchRemote

func FetchRemote(ctx context.Context, remoteKey, destDir string) (string, error)

FetchRemote downloads the object at remoteKey to a local file in destDir. It returns the local file path on success.

remoteKey must be a URI understood by rclone (or a minio:// URI — see package-level documentation for the rewrite rules).

If remoteKey ends in ".age" the caller is responsible for decrypting the returned file; FetchRemote copies the raw (still encrypted) bytes.

func IsRemoteKey

func IsRemoteKey(key string) bool

IsRemoteKey reports whether key is a supported remote destination URI (i.e. not a local filesystem path).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL