rustic icon indicating copy to clipboard operation
rustic copied to clipboard

Empty dir as source is not backuped

Open Zesko opened this issue 1 year ago • 13 comments

Hi, I tried to test rustic version 0.7.0 on Arch Linux with Btrfs in VM.

The output of $ rustic snapshots

snapshots for (host [archlinux], label [label], paths [/btrfs/@home/test/Desktop,/btrfs/@home/test/Documents,/btrfs/@home/test/Downloads])
| ID       | Time                | Host      | Label | Tags | Paths                       | Files | Dirs |     Size |
|----------|---------------------|-----------|-------|------|-----------------------------|-------|------|----------|
| 6dd641f9 | 2024-05-22 14:35:20 | archlinux | label |      | /btrfs/@home/test/Desktop   |   244 |  268 |  8.0 GiB |
|          |                     |           |       |      | /btrfs/@home/test/Documents |       |      |          |
|          |                     |           |       |      | /btrfs/@home/test/Downloads |       |      |          |
| 0cff64d2 | 2024-05-22 14:35:37 | archlinux | label |      | /btrfs/@home/test/Desktop   |   327 |  268 | 10.7 GiB |
|          |                     |           |       |      | /btrfs/@home/test/Documents |       |      |          |
|          |                     |           |       |      | /btrfs/@home/test/Downloads |       |      |          |
| 8bdb6d5c | 2024-05-22 14:40:11 | archlinux | label |      | /btrfs/@home/test/Desktop   |   415 |  268 | 13.7 GiB |
|          |                     |           |       |      | /btrfs/@home/test/Documents |       |      |          |
|          |                     |           |       |      | /btrfs/@home/test/Downloads |       |      |          |
| 766e74ca | 2024-05-22 14:44:18 | archlinux | label |      | /btrfs/@home/test/Desktop   |   495 |  268 | 16.5 GiB |
|          |                     |           |       |      | /btrfs/@home/test/Documents |       |      |          |
|          |                     |           |       |      | /btrfs/@home/test/Downloads |       |      |          |
| 1c42e574 | 2024-05-22 14:44:50 | archlinux | label |      | /btrfs/@home/test/Desktop   |   576 |  267 | 19.3 GiB |
|          |                     |           |       |      | /btrfs/@home/test/Documents |       |      |          |
|          |                     |           |       |      | /btrfs/@home/test/Downloads |       |      |          |
| b2381bfb | 2024-05-22 14:46:25 | archlinux | label |      | /btrfs/@home/test/Desktop   |   658 |  267 | 22.2 GiB |
|          |                     |           |       |      | /btrfs/@home/test/Documents |       |      |          |
|          |                     |           |       |      | /btrfs/@home/test/Downloads |       |      |          |
6 snapshot(s)

Each snapshot has 3 different sources: Desktop, Documents and Downloads , that is right.
Some of them should have blank Documents.

Issue:

I checked to run ls the latest snapshot b2381bfb:

$ rustic ls b2381bfb:btrfs/@home/test/ shows:

[INFO] using config /etc/rustic/rustic.toml
[INFO] repository local:/home/test/Desktop/rustic: password is correct.
[INFO] using cache at /home/test/.cache/rustic/e1787b1f622aa5a803b70a94e11175bb8f004ed3d01f4be97a4e976de018476a
[00:00:00] reading index...               ████████████████████████████████████████          8/8                                                                                                                                                                                            [00:00:00] getting snapshot...            ████████████████████████████████████████          0                                                                                                                                                                                              [INFO] getting snapshot...
"Desktop" 
"Downloads" 

But where is the empty directory "Documents"?

I checked restic to mount this snapshot, but there is no "Documents" in this snapshot.

I checked some older snapshots they have no "Documents".

Config:

Here is a config for test on VM.

[global]
log-level = "info"

[repository]
repository = "/home/test/Desktop/rustic"
password = "test"

[forget]
keep-last = 10

[backup]
git-ignore = true # Respect all gitignore files anywhere
label = "label" 
glob = [
  "!.snapshots/",
  "!.cache/",
]

[[backup.sources]]
source = "/btrfs/@home/test/Desktop /btrfs/@home/test/Documents /btrfs/@home/test/Downloads"

Zesko avatar May 22 '24 13:05 Zesko