Documentation
¶
Overview ¶
Package extract turns an encrypted UniFi backup file into a uniform, inspectable container of named entries.
It supports the two UniFi backup container formats:
.unf site export or classic controller autobackup. AES-128-CBC (static key + IV) -> ZIP archive.
.unifi UniFi OS / UCore console full backup. AES-256-CBC (static key, IV = first 16 bytes) -> gzip -> tar archive.
After decryption both are reduced to a list of Entry values so callers can treat MongoDB dumps, system properties, and Postgres files the same way.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backup ¶
type Backup struct {
Kind Kind
Container []byte // the raw decrypted container (a .zip or .tar)
ContainerExt string // ".zip" or ".tar"
Entries []Entry // files contained within
}
Backup is a fully decrypted, unpacked UniFi backup.
func Open ¶
Open reads and decrypts the backup at path. The format is chosen by file extension; pass forceKind to override detection (empty string = auto).