backup-streams

command
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

Command backup-streams backs up multiple streams of data — virtual files that exist nowhere on disk — in one gopbs.Backup call. The streams are placed under a virtual root directory named after the archive, and the snapshot gets a catalog, so everything browses and restores like a real directory tree.

A stream's size must be declared up front (the archive layout commits to it), which leads to three practical patterns, all shown here:

  1. generate into a buffer first, then declare the buffer's length — for content whose size is unknown until produced;
  2. an open file with the size from fstat — streams file content without buffering it;
  3. a pure reader whose size is known a priori — nothing is buffered at all, the content is produced as the backup consumes it.

The flag defaults match the test stack in tests/compose.yml:

cd tests && docker compose up -d garage pmoxs3
go run ./examples/backup-streams

Jump to

Keyboard shortcuts

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