> V1.0.4 > References > Command line syntax
Version v1.0.4

Outdated Documentation

You're viewing documentation for version v1.0.4. This version may contain outdated information.

Command line syntax

Last reviewed: 2026-02-03 / Plakar v1.1.0

Plakar exposes several types of commands, depending on the resources they operate on (stores, sources, and/or destinations).

General Syntax

plakar [at <store>] <command> [options] [arguments]
ComponentRequiredDescription
at <store>NoSpecifies target Kloset Store; defaults to ~/.plakar if omitted
<command>YesThe operation to perform
[options]NoCommand-specific flags (must precede arguments)
[arguments]VariesPaths, snapshot IDs, or other command inputs

Store Specification

Syntax

plakar at <store-location> <command> [options] [arguments]

Location Types

TypeSyntaxExample
Filesystem path/path/to/storeplakar at /backup/kloset ls
Alias@alias-nameplakar at @s3-backup ls
SFTPsftp://host/pathplakar at sftp://server/backup ls
S3s3://bucket/pathplakar at s3://mybucket/store ls
Default(omit at)plakar ls (uses ~/.plakar)

Store Aliases

Aliases are configured with plakar store add:

plakar store add <alias> <location> [key=value ...]

Parameters:

ParameterRequiredDescription
<alias>YesName for the alias (used with @)
<location>YesStore location (path or URI)
key=valueNoProtocol-specific parameters

Common Parameters:

KeyUsed ForExample
passphraseEncrypted storespassphrase='secret'
access_keyS3 storesaccess_key=AKIAIOSFODNN7EXAMPLE
secret_access_keyS3 storessecret_access_key=wJalrXUtnFEMI
use_tlsS3/SFTPuse_tls=false

Example:

plakar store add backup s3://mybucket/store \
  access_key=minioadmin \
  secret_access_key=minioadmin \
  use_tls=false

Source Specification

Sources are locations to back up from.

Syntax

plakar at <store> backup [options] <source>

Location Types

TypeSyntaxExample
Filesystem path/path or ./pathplakar backup /home/user/docs
Alias@alias-nameplakar backup @myfiles
SFTPsftp://host/pathplakar backup sftp://server/data
S3s3://bucket/pathplakar backup s3://bucket/folder

Source Aliases

Aliases are configured with plakar source add:

plakar source add <alias> <location> [key=value ...]

Example:

plakar source add mybucket s3://localhost:9000/data \
  access_key=minioadmin \
  secret_access_key=minioadmin \
  use_tls=false

Destination Specification

Destinations are locations to restore to.

Syntax

plakar at <store> restore -to <destination> <snapshot-id>

Location Types

TypeSyntaxExample
Filesystem path/path or ./pathplakar restore -to /restore/dir abc123
Alias@alias-nameplakar restore -to @target abc123
SFTPsftp://host/pathplakar restore -to sftp://server/restore abc123
S3s3://bucket/pathplakar restore -to s3://bucket/restore abc123

Destination Aliases

Aliases are configured with plakar destination add:

plakar destination add <alias> <location> [key=value ...]

Example:

plakar destination add target s3://localhost:9000/restore \
  access_key=minioadmin \
  secret_access_key=minioadmin \
  use_tls=false

Argument Order

Order matters in plakar commands. Options must precede arguments.

Pattern:

plakar [at <store>] <command> [options] <arguments>

Examples:

StatusCommand
Correctplakar at /store backup -check /path
Incorrectplakar at /store backup /path -check

Common Commands

Store Operations

CommandSyntaxDescription
createplakar at <store> createInitialize new Kloset Store
lsplakar at <store> ls [snapshot-id]List snapshots or snapshot contents
checkplakar at <store> check [snapshot-id]Verify integrity
infoplakar at <store> infoDisplay store metadata

Backup Operations

CommandSyntaxDescription
backupplakar at <store> backup [options] <source>Create snapshot
pushplakar at <store> push [options] <source>Scheduled backup (same as backup)

Restore Operations

CommandSyntaxDescription
restoreplakar at <store> restore -to <dest> <snapshot-id>Restore snapshot
catplakar at <store> cat <snapshot-id>:<path>Output file contents

Configuration

CommandSyntaxDescription
store addplakar store add <alias> <location> [params]Add store alias
source addplakar source add <alias> <location> [params]Add source alias
destination addplakar destination add <alias> <location> [params]Add destination alias

Help System

Quick Help

Display command usage:

plakar <command> -h
plakar <command> --help

Output:

Usage: <command> [OPTIONS] arguments

OPTIONS:
  ...

Manual Pages

Display detailed documentation:

plakar help <command>

Output includes:

  • Full command description
  • All options with explanations
  • Examples
  • Related commands (SEE ALSO section)

Example:

# View backup command manual
plakar help backup

# View related source configuration manual
plakar help source

Special Syntax

Snapshot References

SyntaxDescription
snapshot-idFull snapshot ID (e.g., eb66133a)
snapshot-id:pathFile within snapshot (e.g., eb66133a:/etc/config)

Alias References

All aliases use @ prefix:

TypeSyntax
Store alias@store-name
Source alias@source-name
Destination alias@dest-name

Found a bug or mistake in the documentation? Create an issue on GitHub