Ptar (Portable Tar) is plakar’s portable archive file format that bundles data from any supported source such as Kloset Stores, the local filesystem or any Plakar plugins added into a single, self-contained .ptar file. Think of it as a “powerful tar file” that includes all of plakar’s advanced features: deduplication, compression, encryption, versioning, and tamper-evidence while remaining completely portable.
Quick Example
# Create a portable archive from your documents
plakar ptar -o documents.ptar /home/user/Documents
# Access it anywhere
plakar at documents.ptar ls
How Ptar Works
A .ptar file is a complete, standalone package that contains:
- Repository metadata: Information about the Kloset Store structure
- Snapshots: All snapshot metadata and history
- Data chunks: Deduplicated blocks of actual file content
When you create a Ptar file, plakar:
- Reads data from one or more sources (Kloset Stores or filesystem paths)
- Deduplicates the data at the block level
- Compresses the deduplicated blocks
- Encrypts the compressed data (unless
-plaintextis specified) - Packages everything into a single
.ptarfile
Supported Sources
One of the most powerful features of Ptar is its ability to ingest data from multiple, diverse locations simultaneously. Supported sources include:
- Local Filesystem: Standard absolute or relative paths (e.g.,
/etcor./data). - Remote Protocols: Any integration supported by plakar plugins, such as
sftp://,s3://, oripfs://. - Kloset Stores: You can use the
-kflag to import existing Kloset stores into a portable archive. - Aliases: While currently being refined in v1.0.6, plakar aims to support repository aliases (e.g.,
@s3-backup) as direct sources.
When to Use Ptar
Ideal use cases are:
- Offsite backups: Create encrypted archives to store in remote locations
- System migrations: Package your data for moving to a new system
- Long-term archival: Self-contained format that includes all metadata
- Sharing backups: Transfer backups as a single portable file
- Compliance storage: Tamper-evident archives with cryptographic verification
Ptar vs. Traditional Archives
| Feature | Ptar | Traditional tar/zip |
|---|---|---|
| Deduplication | ✓ Block-level | ✗ None |
| Compression | ✓ Automatic (LZ4) | ✓ Optional |
| Encryption | ✓ Built-in (AES256) | ✗ Requires separate tools |
| Versioning | ✓ Multiple snapshots | ✗ Single version |
| Tamper detection | ✓ Cryptographic verification | ✗ None |
File Format & Technical Details
Because a .ptar file is a single-file implementation of a Kloset Store, it inherits all the performance and security characteristics of the plakar ecosystem.
- Storage Logic: For detailed information on how data is deduplicated, compressed, and secured, please refer to the Kloset Store Documentation.
- Integrity: Running
plakar at backup.ptar checkverifies the cryptographic integrity of every chunk.
Further Reading
For a deeper dive into the philosophy and technical design of the format, check out the following posts on the plakar blog: