$linuxjunkies
>

kopia(1)

Kopia is a fast, secure, and efficient backup and restore tool that deduplicates data and supports multiple storage backends.

UbuntuDebianFedoraArch

Synopsis

kopia [GLOBAL OPTIONS] COMMAND [COMMAND OPTIONS]

Description

Kopia is a backup and restore utility designed for creating encrypted, deduplicated snapshots of files and directories. It supports local storage, cloud providers (AWS S3, Azure, Google Cloud), and network locations, making it flexible for various backup scenarios.

Data is automatically deduplicated at the block level, compressed, and encrypted, reducing storage costs while maintaining security. Kopia maintains a local index of all snapshots and provides efficient incremental backups.

Common workflows include creating snapshots, listing snapshots, restoring files, and managing retention policies across multiple storage backends.

Common options

FlagWhat it does
-h, --helpShow help message and exit
--log-levelSet logging level (debug, info, warning, error)
--config-filePath to configuration file (default: ~/.kopia/config.json)
--passwordRepository password for encryption/decryption
--no-check-for-updatesDisable automatic update checks
-q, --quietSuppress non-error output

Examples

Initialize a new backup repository on local filesystem

kopia repository create filesystem --path /backup/storage

Create a snapshot of the documents directory

kopia snapshot create /home/user/documents

List all existing snapshots in the repository

kopia snapshot list

Restore a complete snapshot to a specified directory

kopia snapshot restore <snapshot-id> --target-dir /restore/location

Set global retention policy: keep 10 latest and 30 daily snapshots

kopia policy set --global --keep-latest 10 --keep-daily 30

Connect repository to AWS S3 bucket for cloud backups

kopia repository connect s3 --bucket my-bucket --endpoint s3.amazonaws.com

Show differences between two snapshots

kopia diff <snapshot-id1> <snapshot-id2>

Run maintenance tasks including cleanup and optimization

kopia maintenance run

Related commands