2022-04-24 15:08:17 +02:00
|
|
|
---
|
|
|
|
title: Kopia
|
2022-11-19 15:25:20 +01:00
|
|
|
visible: true
|
2022-04-24 15:08:17 +02:00
|
|
|
---
|
|
|
|
|
2022-06-06 18:34:06 +02:00
|
|
|
[toc]
|
2023-02-23 14:48:51 +01:00
|
|
|
|
2022-04-24 15:08:17 +02:00
|
|
|
## Installation
|
2023-02-23 14:48:51 +01:00
|
|
|
|
2022-04-24 15:08:17 +02:00
|
|
|
### Debian
|
2023-02-23 14:48:51 +01:00
|
|
|
|
|
|
|
```sh
|
|
|
|
curl -s https://kopia.io/signing-key | sudo apt-key add -
|
|
|
|
echo "deb http://packages.kopia.io/apt/ stable main" | sudo tee /etc/apt/sources.list.d/kopia.list
|
|
|
|
sudo apt update
|
|
|
|
sudo apt install kopia
|
|
|
|
```
|
2022-04-24 15:08:17 +02:00
|
|
|
|
|
|
|
## Connect Repository
|
2023-02-23 14:48:51 +01:00
|
|
|
|
|
|
|
To create a new repo, replace "connect" with "create"
|
|
|
|
|
2022-04-24 15:08:17 +02:00
|
|
|
### B2
|
2023-02-23 14:48:51 +01:00
|
|
|
|
|
|
|
```sh
|
|
|
|
kopia repository connect b2 \
|
2022-04-24 15:08:17 +02:00
|
|
|
--bucket=(bucket name) \
|
|
|
|
--key-id=(api key id) \
|
|
|
|
--key=(api key)
|
|
|
|
```
|
|
|
|
|
|
|
|
> [Official Documentation](https://kopia.io/docs/reference/command-line/common/repository-connect-b2/)
|
|
|
|
|
|
|
|
## Policy
|
2023-02-23 14:48:51 +01:00
|
|
|
|
2022-04-24 15:08:17 +02:00
|
|
|
Get global policy
|
2023-02-23 14:48:51 +01:00
|
|
|
`# kopia policy get --global`
|
2022-04-24 15:08:17 +02:00
|
|
|
|
|
|
|
Change global retention
|
|
|
|
Options are `latest, hourly, daily, weekly, monthly, annual`
|
2023-02-23 14:48:51 +01:00
|
|
|
`# kopia policy set --keep-(option) (number)`
|
2022-04-24 15:08:17 +02:00
|
|
|
|
|
|
|
Change compression
|
2023-02-23 14:48:51 +01:00
|
|
|
`# kopiy policy set --compression zstd-best-compression --global`
|
2022-04-24 15:08:17 +02:00
|
|
|
|
|
|
|
## Snapshots
|
|
|
|
|
2023-02-23 14:48:51 +01:00
|
|
|
`# kopia snapshot create (path)`
|
|
|
|
|
|
|
|
`# kopia snapshot list (path)`
|
2022-04-24 15:08:17 +02:00
|
|
|
|
|
|
|
> [Check the "Getting Started" Page for more options](https://kopia.io/docs/getting-started/)
|