SFTP (sftp)

The sftp backend stores archives on a remote server using the SSH File Transfer Protocol. This allows you to use any server with SSH access as a backup destination.

Configuration

# Example aegis.toml configuration:
[backends.my-sftp-backend]
type = "sftp"
host = "sftp.example.org"
port = 22 # Optional
username = "alice"
remote_path = "/path/to/write/backups"
key_path = "~/.ssh/id_ed25519"

Options

OptionTypeRequiredDescription
typeStringYesMust be "sftp"
hostStringYesHostname or IP address of the server
portOptionNoSSH port (default: 22)
usernameStringYesSSH username
remote_pathStringYesAbsolute path on the server for storing data
key_pathStringYesPath to SSH private key file (supports `~` expansion)

Storage Structure

On the remote server, Aegis creates:

{remote_path}/
├── blobs/
│   ├── ab/ab123...
│   └── cd/cd456...
├── snapshots/
│   └── {repo-name}/
│       ├── 2024-01-01T12:00:00Z
│       └── 2024-01-02T12:00:00Z
└── tmp/
    └── ...  # Temporary files during uploads