Skip to content

Archive

archive outbound writes file entries into an archive file.

Structure

{
  "type": "archive",
  "tag": "archive-out",
  "path": "/backup/backup.tar",
  "format": "tar",
  "compression": {
    "algorithm": "zstd",
    "level": 6
  },
  "encryption": {
    "algorithm": "aes-256-gcm",
    "password": "$ENCRYPTION_KEY"
  },
  "keep": 10,
  "outbound": "",

  ... // Metadata Fields
}

A compressed or encrypted tar archive cannot be appended to. Routing entries from a live inbound such as FSWatch to such an archive fails at startup. The custom format supports appending regardless of these options.

Fields

path

Required

The path to the archive file.

format

The archive format.

Format Description
tar Standard tar format
custom Custom block-based archive format, .tes suffix

tar is used by default.

compression

Compression applied to the archive.

For the tar format, the whole archive stream is compressed. For the custom format, each entry's content is compressed individually and the codec is recorded per entry, so entries stay randomly accessible.

To compress the whole archive stream instead, wrap this outbound with the Compress outbound.

compression.algorithm

Required

The compression algorithm.

Algorithm Description
gzip DEFLATE with gzip framing
zstd Zstandard
lz4 LZ4

compression.level

Compression level, from 1 to 9.

6 is used by default.

encryption

Encryption applied to the archive.

For the tar format, the whole archive stream is encrypted. For the custom format, each entry's content is encrypted individually with a fresh per-entry key, and the algorithm is recorded per entry, so entries stay randomly accessible. When combined with compression, content is compressed before it is encrypted.

To encrypt the whole archive stream instead, wrap this outbound with the Encrypt outbound.

encryption.algorithm

Required

The encryption algorithm.

Algorithm Description
aes-256-gcm AES-256 in GCM mode
chacha20 ChaCha20-Poly1305

encryption.password

Required

The encryption password.

The key is derived from the password using Argon2id.

keep

The number of archives to keep.

When set, each backup run writes a new archive named with a timestamp suffix, and the oldest archives beyond the count are removed. When not set, a single archive is written at path.

outbound

The tag of the outbound that stores the archive file.

When set, the archive byte stream is written through the referenced outbound instead of the local filesystem, and path is interpreted relative to that outbound. Supported targets are Local, S3, SFTP, and Chunk.

The archive is written to the local filesystem if empty.

Metadata Fields

See Metadata Fields for details.

Metadata fields control which file attributes are recorded in the archive.