Kopia restore process: Difference between revisions
(Created page with "Category: Backup") |
No edit summary |
||
| Line 1: | Line 1: | ||
= Overview = | |||
This page describes the process of restoring instance data from a Kopia backup. | |||
= Connecting a backup repository = | |||
Before data can be restored from a backup, the appropriate Kopia repository needs to be connected to. | |||
The repository connection details are stored locally on the server that is being backed up. | |||
Each server contains the credentials and configuration required to access its own Kopia repository. | |||
First connect to the server: | |||
<syntaxhighlight lang="bash"> | |||
# For example: ssh sst-int-001 | |||
ssh | |||
</syntaxhighlight> | |||
Then set the path leading to the access information as a variable: | |||
<syntaxhighlight lang="bash"> | |||
# For example: file=/home/sst-all/access.yaml | |||
file= | |||
</syntaxhighlight> | |||
Set the required access parameters as variables: | |||
<syntaxhighlight lang="bash"> | |||
endpoint=$(awk -F': ' '/^[[:space:]]*endpoint:/ {gsub(/"/,"",$2); print $2}' "$file") | |||
bucket=$(awk -F': ' '/^[[:space:]]*bucket:/ {gsub(/"/,"",$2); print $2}' "$file") | |||
prefix=$(awk -F': ' '/^[[:space:]]*prefix:/ {gsub(/"/,"",$2); print $2}' "$file") | |||
access_key=$(awk -F': ' '/^[[:space:]]*access_key:/ {gsub(/"/,"",$2); print $2}' "$file") | |||
secret_access_key=$(awk -F': ' '/^[[:space:]]*secret_access_key:/ {gsub(/"/,"",$2); print $2}' "$file") | |||
password=$(awk -F': ' '/^[[:space:]]*password:/ {gsub(/"/,"",$2); print $2}' "$file") | |||
</syntaxhighlight> | |||
Check the created variables like so: | |||
<syntaxhighlight lang="bash"> | |||
cat <<EOF | |||
S3_ENDPOINT="$endpoint" | |||
S3_BUCKET="$bucket" | |||
S3_PREFIX="$prefix" | |||
S3_ACCESS_KEY="$access_key" | |||
S3_SECRET_ACCESS_KEY="$secret_access_key" | |||
KOPIA_PASSWORD="$password" | |||
EOF | |||
</syntaxhighlight> | |||
If everything looks fine connect to the repository: | |||
<syntaxhighlight lang="bash"> | |||
kopia repo connect s3 \ | |||
--readonly \ | |||
--endpoint="$endpoint" \ | |||
--bucket="$bucket" \ | |||
--prefix="$prefix" \ | |||
--access-key="$access_key" \ | |||
--secret-access-key="$secret_access_key" \ | |||
--password="$password" | |||
</syntaxhighlight> | |||
{{Note|collapsed=true|title=Output:|content= | |||
<syntaxhighlight lang='text'> | |||
Connected to repository. | |||
NOTICE: Kopia will check for updates on GitHub every 7 days, starting 24 hours after first use. | |||
To disable this behavior, set environment variable KOPIA_CHECK_FOR_UPDATES=false | |||
Alternatively you can remove the file "/root/.config/kopia/repository.config.update-info.json". | |||
</syntaxhighlight> | |||
}} | |||
= Inspecting data = | |||
After connecting to the repository snapshots can be listed like so: | |||
<syntaxhighlight lang="bash"> | |||
kopia snapshot list --all --show-identical | |||
</syntaxhighlight> | |||
Usually each mountpoint has it's own snapshots: | |||
{{Note|collapsed=true|title=Output:|content= | |||
<syntaxhighlight lang='text', highlight=1,13,25,37,49 > | |||
root@sst-int-001:/etc | |||
2026-05-26 03:04:27 CEST k2d1601c231eed28510d797778b27091c 27.1 MB drwxr-xr-x files:1430 dirs:444 (daily-10) | |||
2026-05-27 03:04:21 CEST kd8f190358cfdf77b226c69b34b19246c 27.1 MB drwxr-xr-x files:1430 dirs:444 (daily-9) | |||
2026-05-28 03:04:33 CEST ke0aee9e74790d6b1e79d4b2816f05254 27.1 MB drwxr-xr-x files:1430 dirs:444 (daily-8) | |||
2026-05-29 03:04:25 CEST ka20e158f4e52335ae06379a65f14fc9b 27.1 MB drwxr-xr-x files:1430 dirs:444 (daily-7) | |||
2026-05-30 03:04:27 CEST k41338685d0d45becad4bebf977a1b2b0 27.1 MB drwxr-xr-x files:1430 dirs:444 (daily-6) | |||
2026-05-31 03:04:20 CEST k4581635f5244edc6d30640277ff40de1 27.1 MB drwxr-xr-x files:1430 dirs:444 (daily-5) | |||
2026-06-01 03:04:48 CEST k8f65195a4d1cababcfb265f0c190077d 27.1 MB drwxr-xr-x files:1430 dirs:444 (daily-4) | |||
2026-06-02 03:04:21 CEST k73777c3e3acd749f829ab8c43f3e60ac 27.1 MB drwxr-xr-x files:1430 dirs:444 (latest-3,daily-3) | |||
2026-06-03 03:04:29 CEST k8c532d7558940d3dd32cc85c57dd0af5 27.1 MB drwxr-xr-x files:1430 dirs:444 (latest-2,daily-2) | |||
2026-06-04 03:04:25 CEST k60796ced54c59316191b355f58d91d98 27.1 MB drwxr-xr-x files:1430 dirs:444 (latest-1,daily-1) | |||
root@sst-int-001:/home | |||
2026-05-26 03:04:35 CEST k85a74d754790d64a0fa17017d23d3649 1.9 MB drwxr-xr-x files:257 dirs:68 (daily-10) | |||
2026-05-27 03:04:29 CEST kbc9814f2c1a8fb94eef77161da59e748 1.9 MB drwxr-xr-x files:257 dirs:68 (daily-9) | |||
2026-05-28 03:04:41 CEST kbc9814f2c1a8fb94eef77161da59e748 1.9 MB drwxr-xr-x files:257 dirs:68 (daily-8) | |||
2026-05-29 03:04:33 CEST kbc9814f2c1a8fb94eef77161da59e748 1.9 MB drwxr-xr-x files:257 dirs:68 (daily-7) | |||
2026-05-30 03:04:35 CEST kbc9814f2c1a8fb94eef77161da59e748 1.9 MB drwxr-xr-x files:257 dirs:68 (daily-6) | |||
2026-05-31 03:04:27 CEST kbc9814f2c1a8fb94eef77161da59e748 1.9 MB drwxr-xr-x files:257 dirs:68 (daily-5) | |||
2026-06-01 03:05:05 CEST kbc9814f2c1a8fb94eef77161da59e748 1.9 MB drwxr-xr-x files:257 dirs:68 (daily-4) | |||
2026-06-02 03:04:29 CEST kbc9814f2c1a8fb94eef77161da59e748 1.9 MB drwxr-xr-x files:257 dirs:68 (latest-3,daily-3) | |||
2026-06-03 03:04:37 CEST kbc9814f2c1a8fb94eef77161da59e748 1.9 MB drwxr-xr-x files:257 dirs:68 (latest-2,daily-2) | |||
2026-06-04 03:04:34 CEST ke55e94ac077bd393838a2b229551c8a9 1.9 MB drwxr-xr-x files:258 dirs:69 (latest-1,daily-1) | |||
root@sst-int-001:/usr/local | |||
2026-05-26 03:04:36 CEST k75894f3af04c9479f86f6ea31808b302 22 KB drwxr-xr-x files:8 dirs:36 (daily-10) | |||
2026-05-27 03:04:30 CEST k75894f3af04c9479f86f6ea31808b302 22 KB drwxr-xr-x files:8 dirs:36 (daily-9) | |||
2026-05-28 03:04:42 CEST k75894f3af04c9479f86f6ea31808b302 22 KB drwxr-xr-x files:8 dirs:36 (daily-8) | |||
2026-05-29 03:04:35 CEST k75894f3af04c9479f86f6ea31808b302 22 KB drwxr-xr-x files:8 dirs:36 (daily-7) | |||
2026-05-30 03:04:36 CEST k75894f3af04c9479f86f6ea31808b302 22 KB drwxr-xr-x files:8 dirs:36 (daily-6) | |||
2026-05-31 03:04:28 CEST k75894f3af04c9479f86f6ea31808b302 22 KB drwxr-xr-x files:8 dirs:36 (daily-5) | |||
2026-06-01 03:05:06 CEST k75894f3af04c9479f86f6ea31808b302 22 KB drwxr-xr-x files:8 dirs:36 (daily-4) | |||
2026-06-02 03:04:30 CEST k75894f3af04c9479f86f6ea31808b302 22 KB drwxr-xr-x files:8 dirs:36 (latest-3,daily-3) | |||
2026-06-03 03:04:38 CEST k75894f3af04c9479f86f6ea31808b302 22 KB drwxr-xr-x files:8 dirs:36 (latest-2,daily-2) | |||
2026-06-04 03:04:35 CEST k75894f3af04c9479f86f6ea31808b302 22 KB drwxr-xr-x files:8 dirs:36 (latest-1,daily-1) | |||
root@sst-int-001:/var/backup | |||
2026-05-26 03:04:38 CEST k737253d9ce3c4889faba67709bd54c30 3.2 GB drwxr-xr-x files:138 dirs:6 (daily-10) | |||
2026-05-27 03:04:32 CEST k1df55cad1be2d85dd3c8b1086161a321 3.5 GB drwxr-xr-x files:139 dirs:6 (daily-9) | |||
2026-05-28 03:04:43 CEST keb7f9d4a5c1908539d2f818c2863f6e5 3.2 GB drwxr-xr-x files:138 dirs:6 (daily-8) | |||
2026-05-29 03:04:37 CEST k76863a5b41c3d70701a43f3a7f56b7b7 3.2 GB drwxr-xr-x files:138 dirs:6 (daily-7) | |||
2026-05-30 03:04:38 CEST k0f6b31464daafe6e6d98ec4933148723 3.2 GB drwxr-xr-x files:138 dirs:6 (daily-6) | |||
2026-05-31 03:04:30 CEST k9128bd6dae323cb7f82534e96ffe312d 3.5 GB drwxr-xr-x files:139 dirs:6 (daily-5) | |||
2026-06-01 03:05:08 CEST k0789f3fe1645403d65daf45d2dca8b95 3.5 GB drwxr-xr-x files:139 dirs:6 (daily-4) | |||
2026-06-02 03:04:31 CEST k906b99f37cadf4c9d645ec0e3a027805 3.2 GB drwxr-xr-x files:138 dirs:6 (latest-3,daily-3) | |||
2026-06-03 03:04:39 CEST ke6ed15e1dd24e8d4f7c3af45cebb2b35 3.2 GB drwxr-xr-x files:138 dirs:6 (latest-2,daily-2) | |||
2026-06-04 03:04:36 CEST k19beeb2a7ee4d720fcebd7865ec63600 3.2 GB drwxr-xr-x files:138 dirs:6 (latest-1,daily-1) | |||
root@sst-int-001:/var/db | |||
2026-05-26 03:04:26 CEST k8532c690ec118016f2daaf1f072f7b72 0 B drwxr-xr-x files:0 dirs:3 (daily-10) | |||
2026-05-27 03:04:20 CEST k8532c690ec118016f2daaf1f072f7b72 0 B drwxr-xr-x files:0 dirs:3 (daily-9) | |||
2026-05-28 03:04:31 CEST k8532c690ec118016f2daaf1f072f7b72 0 B drwxr-xr-x files:0 dirs:3 (daily-8) | |||
2026-05-29 03:04:23 CEST k8532c690ec118016f2daaf1f072f7b72 0 B drwxr-xr-x files:0 dirs:3 (daily-7) | |||
2026-05-30 03:04:26 CEST k8532c690ec118016f2daaf1f072f7b72 0 B drwxr-xr-x files:0 dirs:3 (daily-6) | |||
2026-05-31 03:04:19 CEST k8532c690ec118016f2daaf1f072f7b72 0 B drwxr-xr-x files:0 dirs:3 (daily-5) | |||
2026-06-01 03:04:47 CEST k8532c690ec118016f2daaf1f072f7b72 0 B drwxr-xr-x files:0 dirs:3 (daily-4) | |||
2026-06-02 03:04:20 CEST k8532c690ec118016f2daaf1f072f7b72 0 B drwxr-xr-x files:0 dirs:3 (latest-3,daily-3) | |||
2026-06-03 03:04:27 CEST k8532c690ec118016f2daaf1f072f7b72 0 B drwxr-xr-x files:0 dirs:3 (latest-2,daily-2) | |||
2026-06-04 03:04:24 CEST k8532c690ec118016f2daaf1f072f7b72 0 B drwxr-xr-x files:0 dirs:3 (latest-1,daily-1) | |||
</syntaxhighlight> | |||
}} | |||
To inspect or restore a snapshot set it's ID as a variable: | |||
<syntaxhighlight lang="bash"> | |||
# For example: snapshot='k85a74d754790d64a0fa17017d23d3649' | |||
snapshot='' | |||
</syntaxhighlight> | |||
Taking a look at the snapshot's contents: | |||
<syntaxhighlight lang="bash"> | |||
kopia ls ${snapshot} | |||
</syntaxhighlight> | |||
{{Note|collapsed=true|title=Output:|content= | |||
<syntaxhighlight lang='text'> | |||
almalinux | |||
sst-yyy | |||
sst-xxx | |||
certbot | |||
</syntaxhighlight> | |||
}} | |||
We can look into the folders, like so: | |||
<syntaxhighlight lang="bash"> | |||
kopia ls ${snapshot}/sst-xxx | |||
</syntaxhighlight> | |||
= Restoring data = | |||
To restore a single file: | |||
<syntaxhighlight lang="bash"> | |||
# Restore a file inside a snapshot to a destination | |||
kopia restore ${snapshot}/home/sst-xxx/example.txt /var/tmp/example.txt | |||
</syntaxhighlight> | |||
{{Note|collapsed=true|title=Output:|content= | |||
<syntaxhighlight lang="bash"> | |||
Restoring to local filesystem (/var/tmp/example.txt) with parallelism=8... | |||
Processed 1 (2.2 MB) of 0 (0 B). | |||
Restored 1 files, 0 directories and 0 symbolic links (2.2 MB). | |||
</syntaxhighlight> | |||
}} | |||
To restore the entire snapshot: | |||
<syntaxhighlight lang="bash"> | |||
# Create a destination directory or use an existing one | |||
mkdir /var/tmp/restore | |||
# Restore the snapshot to the destination | |||
kopia restore ${snapshot} /var/tmp/restore/ | |||
</syntaxhighlight> | |||
{{Note|collapsed=true|title=Output:|content= | |||
<syntaxhighlight lang="bash"> | |||
Restoring to local filesystem (/var/tmp/restore) with parallelism=8... | |||
Processed 3297 (3 GB) of 3296 (3 GB) 56.5 MB/s (100.0%) remaining 0s. | |||
Restored 2950 files, 347 directories and 0 symbolic links (3 GB). | |||
</syntaxhighlight> | |||
}} | |||
[[Category: Backup]] | [[Category: Backup]] | ||
Latest revision as of 11:43, 4 June 2026
Overview
This page describes the process of restoring instance data from a Kopia backup.
Connecting a backup repository
Before data can be restored from a backup, the appropriate Kopia repository needs to be connected to.
The repository connection details are stored locally on the server that is being backed up. Each server contains the credentials and configuration required to access its own Kopia repository.
First connect to the server:
# For example: ssh sst-int-001
ssh
Then set the path leading to the access information as a variable:
# For example: file=/home/sst-all/access.yaml
file=
Set the required access parameters as variables:
endpoint=$(awk -F': ' '/^[[:space:]]*endpoint:/ {gsub(/"/,"",$2); print $2}' "$file")
bucket=$(awk -F': ' '/^[[:space:]]*bucket:/ {gsub(/"/,"",$2); print $2}' "$file")
prefix=$(awk -F': ' '/^[[:space:]]*prefix:/ {gsub(/"/,"",$2); print $2}' "$file")
access_key=$(awk -F': ' '/^[[:space:]]*access_key:/ {gsub(/"/,"",$2); print $2}' "$file")
secret_access_key=$(awk -F': ' '/^[[:space:]]*secret_access_key:/ {gsub(/"/,"",$2); print $2}' "$file")
password=$(awk -F': ' '/^[[:space:]]*password:/ {gsub(/"/,"",$2); print $2}' "$file")
Check the created variables like so:
cat <<EOF
S3_ENDPOINT="$endpoint"
S3_BUCKET="$bucket"
S3_PREFIX="$prefix"
S3_ACCESS_KEY="$access_key"
S3_SECRET_ACCESS_KEY="$secret_access_key"
KOPIA_PASSWORD="$password"
EOF
If everything looks fine connect to the repository:
kopia repo connect s3 \
--readonly \
--endpoint="$endpoint" \
--bucket="$bucket" \
--prefix="$prefix" \
--access-key="$access_key" \
--secret-access-key="$secret_access_key" \
--password="$password"
Connected to repository.
NOTICE: Kopia will check for updates on GitHub every 7 days, starting 24 hours after first use.
To disable this behavior, set environment variable KOPIA_CHECK_FOR_UPDATES=false
Alternatively you can remove the file "/root/.config/kopia/repository.config.update-info.json".
Inspecting data
After connecting to the repository snapshots can be listed like so:
kopia snapshot list --all --show-identical
Usually each mountpoint has it's own snapshots:
root@sst-int-001:/etc
2026-05-26 03:04:27 CEST k2d1601c231eed28510d797778b27091c 27.1 MB drwxr-xr-x files:1430 dirs:444 (daily-10)
2026-05-27 03:04:21 CEST kd8f190358cfdf77b226c69b34b19246c 27.1 MB drwxr-xr-x files:1430 dirs:444 (daily-9)
2026-05-28 03:04:33 CEST ke0aee9e74790d6b1e79d4b2816f05254 27.1 MB drwxr-xr-x files:1430 dirs:444 (daily-8)
2026-05-29 03:04:25 CEST ka20e158f4e52335ae06379a65f14fc9b 27.1 MB drwxr-xr-x files:1430 dirs:444 (daily-7)
2026-05-30 03:04:27 CEST k41338685d0d45becad4bebf977a1b2b0 27.1 MB drwxr-xr-x files:1430 dirs:444 (daily-6)
2026-05-31 03:04:20 CEST k4581635f5244edc6d30640277ff40de1 27.1 MB drwxr-xr-x files:1430 dirs:444 (daily-5)
2026-06-01 03:04:48 CEST k8f65195a4d1cababcfb265f0c190077d 27.1 MB drwxr-xr-x files:1430 dirs:444 (daily-4)
2026-06-02 03:04:21 CEST k73777c3e3acd749f829ab8c43f3e60ac 27.1 MB drwxr-xr-x files:1430 dirs:444 (latest-3,daily-3)
2026-06-03 03:04:29 CEST k8c532d7558940d3dd32cc85c57dd0af5 27.1 MB drwxr-xr-x files:1430 dirs:444 (latest-2,daily-2)
2026-06-04 03:04:25 CEST k60796ced54c59316191b355f58d91d98 27.1 MB drwxr-xr-x files:1430 dirs:444 (latest-1,daily-1)
root@sst-int-001:/home
2026-05-26 03:04:35 CEST k85a74d754790d64a0fa17017d23d3649 1.9 MB drwxr-xr-x files:257 dirs:68 (daily-10)
2026-05-27 03:04:29 CEST kbc9814f2c1a8fb94eef77161da59e748 1.9 MB drwxr-xr-x files:257 dirs:68 (daily-9)
2026-05-28 03:04:41 CEST kbc9814f2c1a8fb94eef77161da59e748 1.9 MB drwxr-xr-x files:257 dirs:68 (daily-8)
2026-05-29 03:04:33 CEST kbc9814f2c1a8fb94eef77161da59e748 1.9 MB drwxr-xr-x files:257 dirs:68 (daily-7)
2026-05-30 03:04:35 CEST kbc9814f2c1a8fb94eef77161da59e748 1.9 MB drwxr-xr-x files:257 dirs:68 (daily-6)
2026-05-31 03:04:27 CEST kbc9814f2c1a8fb94eef77161da59e748 1.9 MB drwxr-xr-x files:257 dirs:68 (daily-5)
2026-06-01 03:05:05 CEST kbc9814f2c1a8fb94eef77161da59e748 1.9 MB drwxr-xr-x files:257 dirs:68 (daily-4)
2026-06-02 03:04:29 CEST kbc9814f2c1a8fb94eef77161da59e748 1.9 MB drwxr-xr-x files:257 dirs:68 (latest-3,daily-3)
2026-06-03 03:04:37 CEST kbc9814f2c1a8fb94eef77161da59e748 1.9 MB drwxr-xr-x files:257 dirs:68 (latest-2,daily-2)
2026-06-04 03:04:34 CEST ke55e94ac077bd393838a2b229551c8a9 1.9 MB drwxr-xr-x files:258 dirs:69 (latest-1,daily-1)
root@sst-int-001:/usr/local
2026-05-26 03:04:36 CEST k75894f3af04c9479f86f6ea31808b302 22 KB drwxr-xr-x files:8 dirs:36 (daily-10)
2026-05-27 03:04:30 CEST k75894f3af04c9479f86f6ea31808b302 22 KB drwxr-xr-x files:8 dirs:36 (daily-9)
2026-05-28 03:04:42 CEST k75894f3af04c9479f86f6ea31808b302 22 KB drwxr-xr-x files:8 dirs:36 (daily-8)
2026-05-29 03:04:35 CEST k75894f3af04c9479f86f6ea31808b302 22 KB drwxr-xr-x files:8 dirs:36 (daily-7)
2026-05-30 03:04:36 CEST k75894f3af04c9479f86f6ea31808b302 22 KB drwxr-xr-x files:8 dirs:36 (daily-6)
2026-05-31 03:04:28 CEST k75894f3af04c9479f86f6ea31808b302 22 KB drwxr-xr-x files:8 dirs:36 (daily-5)
2026-06-01 03:05:06 CEST k75894f3af04c9479f86f6ea31808b302 22 KB drwxr-xr-x files:8 dirs:36 (daily-4)
2026-06-02 03:04:30 CEST k75894f3af04c9479f86f6ea31808b302 22 KB drwxr-xr-x files:8 dirs:36 (latest-3,daily-3)
2026-06-03 03:04:38 CEST k75894f3af04c9479f86f6ea31808b302 22 KB drwxr-xr-x files:8 dirs:36 (latest-2,daily-2)
2026-06-04 03:04:35 CEST k75894f3af04c9479f86f6ea31808b302 22 KB drwxr-xr-x files:8 dirs:36 (latest-1,daily-1)
root@sst-int-001:/var/backup
2026-05-26 03:04:38 CEST k737253d9ce3c4889faba67709bd54c30 3.2 GB drwxr-xr-x files:138 dirs:6 (daily-10)
2026-05-27 03:04:32 CEST k1df55cad1be2d85dd3c8b1086161a321 3.5 GB drwxr-xr-x files:139 dirs:6 (daily-9)
2026-05-28 03:04:43 CEST keb7f9d4a5c1908539d2f818c2863f6e5 3.2 GB drwxr-xr-x files:138 dirs:6 (daily-8)
2026-05-29 03:04:37 CEST k76863a5b41c3d70701a43f3a7f56b7b7 3.2 GB drwxr-xr-x files:138 dirs:6 (daily-7)
2026-05-30 03:04:38 CEST k0f6b31464daafe6e6d98ec4933148723 3.2 GB drwxr-xr-x files:138 dirs:6 (daily-6)
2026-05-31 03:04:30 CEST k9128bd6dae323cb7f82534e96ffe312d 3.5 GB drwxr-xr-x files:139 dirs:6 (daily-5)
2026-06-01 03:05:08 CEST k0789f3fe1645403d65daf45d2dca8b95 3.5 GB drwxr-xr-x files:139 dirs:6 (daily-4)
2026-06-02 03:04:31 CEST k906b99f37cadf4c9d645ec0e3a027805 3.2 GB drwxr-xr-x files:138 dirs:6 (latest-3,daily-3)
2026-06-03 03:04:39 CEST ke6ed15e1dd24e8d4f7c3af45cebb2b35 3.2 GB drwxr-xr-x files:138 dirs:6 (latest-2,daily-2)
2026-06-04 03:04:36 CEST k19beeb2a7ee4d720fcebd7865ec63600 3.2 GB drwxr-xr-x files:138 dirs:6 (latest-1,daily-1)
root@sst-int-001:/var/db
2026-05-26 03:04:26 CEST k8532c690ec118016f2daaf1f072f7b72 0 B drwxr-xr-x files:0 dirs:3 (daily-10)
2026-05-27 03:04:20 CEST k8532c690ec118016f2daaf1f072f7b72 0 B drwxr-xr-x files:0 dirs:3 (daily-9)
2026-05-28 03:04:31 CEST k8532c690ec118016f2daaf1f072f7b72 0 B drwxr-xr-x files:0 dirs:3 (daily-8)
2026-05-29 03:04:23 CEST k8532c690ec118016f2daaf1f072f7b72 0 B drwxr-xr-x files:0 dirs:3 (daily-7)
2026-05-30 03:04:26 CEST k8532c690ec118016f2daaf1f072f7b72 0 B drwxr-xr-x files:0 dirs:3 (daily-6)
2026-05-31 03:04:19 CEST k8532c690ec118016f2daaf1f072f7b72 0 B drwxr-xr-x files:0 dirs:3 (daily-5)
2026-06-01 03:04:47 CEST k8532c690ec118016f2daaf1f072f7b72 0 B drwxr-xr-x files:0 dirs:3 (daily-4)
2026-06-02 03:04:20 CEST k8532c690ec118016f2daaf1f072f7b72 0 B drwxr-xr-x files:0 dirs:3 (latest-3,daily-3)
2026-06-03 03:04:27 CEST k8532c690ec118016f2daaf1f072f7b72 0 B drwxr-xr-x files:0 dirs:3 (latest-2,daily-2)
2026-06-04 03:04:24 CEST k8532c690ec118016f2daaf1f072f7b72 0 B drwxr-xr-x files:0 dirs:3 (latest-1,daily-1)
To inspect or restore a snapshot set it's ID as a variable:
# For example: snapshot='k85a74d754790d64a0fa17017d23d3649'
snapshot=''
Taking a look at the snapshot's contents:
kopia ls ${snapshot}
almalinux
sst-yyy
sst-xxx
certbot
We can look into the folders, like so:
kopia ls ${snapshot}/sst-xxx
Restoring data
To restore a single file:
# Restore a file inside a snapshot to a destination
kopia restore ${snapshot}/home/sst-xxx/example.txt /var/tmp/example.txt
Restoring to local filesystem (/var/tmp/example.txt) with parallelism=8...
Processed 1 (2.2 MB) of 0 (0 B).
Restored 1 files, 0 directories and 0 symbolic links (2.2 MB).
To restore the entire snapshot:
# Create a destination directory or use an existing one
mkdir /var/tmp/restore
# Restore the snapshot to the destination
kopia restore ${snapshot} /var/tmp/restore/
Restoring to local filesystem (/var/tmp/restore) with parallelism=8...
Processed 3297 (3 GB) of 3296 (3 GB) 56.5 MB/s (100.0%) remaining 0s.
Restored 2950 files, 347 directories and 0 symbolic links (3 GB).