disk

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Package disk serves the DiskBackup RPC interface: backup and restore of disk images, driven by a client that need not be running on the server host.

Two steps genuinely have to happen here rather than on the client. Moving the image bytes, because the image is a file in the server's data directory. And talking to miren.cloud, because that authenticates as the cluster using a key that lives only on the server and should never reach a laptop. Everything else — resolving which disk the operator means, deciding which restore point to use, writing a snapshot to a file — is orchestration the client does.

See RFD-108.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HealthServer added in v0.18.0

type HealthServer struct {
	// contains filtered or unexported fields
}

HealthServer exposes only lifecycle diagnostics, independently of disk backup and its filesystem/cloud dependencies.

func NewHealthServer added in v0.18.0

func NewHealthServer(log *slog.Logger, eac *entityserver_v1alpha.EntityAccessClient) *HealthServer

func (*HealthServer) List added in v0.18.0

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server implements disk_v1alpha.DiskBackup.

func NewServer

NewServer builds the disk backup service. updates may be nil, which means the cluster has no cloud to back up to.

func (*Server) Backup

func (s *Server) Backup(ctx context.Context, state *disk_v1alpha.DiskBackupBackup) error

Backup snapshots a disk, either to miren.cloud or down to the client.

func (*Server) ListBackups

func (s *Server) ListBackups(ctx context.Context, state *disk_v1alpha.DiskBackupListBackups) error

ListBackups returns the restore points a disk can be restored to, newest first.

func (*Server) ListDeleted

func (s *Server) ListDeleted(ctx context.Context, state *disk_v1alpha.DiskBackupListDeleted) error

ListDeleted reports the disks still recoverable from the soft-delete holding area.

func (*Server) Restore

func (s *Server) Restore(ctx context.Context, state *disk_v1alpha.DiskBackupRestore) (retErr error)

Restore rebuilds a disk's image, either from a restore point in miren.cloud or from a snapshot the client streams up.

Restoring a disk this cluster has never seen creates it, which is the case that matters for disaster recovery: the host is gone and the whole task is to rebuild onto a new one.

func (*Server) TransferOffset

func (s *Server) TransferOffset(ctx context.Context, state *disk_v1alpha.DiskBackupTransferOffset) error

TransferOffset reports how many bytes of a transfer the server already holds.

An id it has never seen reports zero rather than failing, so a client's first attempt and its retries take the same path.

func (*Server) Undelete

func (s *Server) Undelete(ctx context.Context, state *disk_v1alpha.DiskBackupUndelete) error

Undelete moves a deleted volume's data back into place and recreates the entities that point at it.

Jump to

Keyboard shortcuts

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