Skip to content

--delete-never Not Working #1148

Closed
@ossie-git

Description

@ossie-git

Hi,

I was testing out --delete-never. From my understanding, it should protect a snapshot from being delted. However, from my testing, it appears to not do anything. This is what I tried using rustic v0.7.0:

$ cat ~/.config/rustic/rustic.toml
[repository]
repository = "/tmp/repo"
password = "test"
no-cache = true
$ rustic backup --delete-never /home/vagrant/btrfs-snapshot-diff/
[INFO] using config /home/vagrant/.config/rustic/rustic.toml
[INFO] repository local:/tmp/repo: password is correct.
[INFO] using no cache
[00:00:00] reading index...               ████████████████████████████████████████          3/3         [00:00:00]                                ████████████████████████████████████████          0
[00:00:00] getting latest snapshot...     ████████████████████████████████████████          0/0         [INFO] using no parent
[INFO] starting to backup "/home/vagrant/btrfs-snapshot-diff"...
[00:00:00] backing up...                  ████████████████████████████████████████ 150.72 KiB/150.72 KiB 4.04 MiB/s   (ETA 0s)Files:       32 new, 0 changed, 0 unchanged
Dirs:        21 new, 0 changed, 0 unchanged
Added to the repo: 0 B (raw: 0 B)
processed 32 files, 150.7 kiB
snapshot 4717f033 successfully saved.
[INFO] backup of "/home/vagrant/btrfs-snapshot-diff" done.
$ rustic snapshots
[INFO] using config /home/vagrant/.config/rustic/rustic.toml
[INFO] repository local:/tmp/repo: password is correct.
[INFO] using no cache

snapshots for (host [localhost-live], label [], paths [/home/vagrant/btrfs-snapshot-diff])
| ID       | Time       | Host            | Label | Tags | Paths          | Files | Dirs |      Size |
|----------|------------|-----------------|-------|------|----------------|-------|------|-----------|
| 4717f033 | 2024-05-07 | localhost-live  |       |      | /home/vagrant/ |    32 |   21 | 150.7 kiB |
|          | 16:10:41   |                 |       |      | btrfs-snapshot |       |      |           |
|          |            |                 |       |      | -diff          |       |      |           |
1 snapshot(s)

total: 1 snapshot(s)
$ rustic snapshots --long
[INFO] using config /home/vagrant/.config/rustic/rustic.toml
[INFO] repository local:/tmp/repo: password is correct.
[INFO] using no cache

snapshots for (host [localhost-live], label [], paths [/home/vagrant/btrfs-snapshot-diff])
| Snapshot      | 4717f033d9cb98cb2aa807cd83361cf6e75738ca2430787cb8ec37b5dc9bb402             |
| Time          | 2024-05-07 16:10:41                                                          |
| Generated by  | rustic v0.7.0                                                                |
| Host          | localhost-live                                                               |
| Label         |                                                                              |
| Tags          |                                                                              |
| Delete        | never                                                                        |
| Paths         | /home/vagrant/btrfs-snapshot-diff                                            |
| Parent        | no parent snapshot                                                           |
|               |                                                                              |
| Command       | rustic backup --delete-never /home/vagrant/btrfs-snapshot-diff/              |
| Source        | files: 32 / dirs: 21 / size: 150.7 kiB                                       |
|               |                                                                              |
| Files         | new:         32 / changed:          0 / unchanged:          0                |
| Dirs          | new:         21 / changed:          0 / unchanged:          0                |
|               |                                                                              |
| Added to repo | data:           0 blobs / raw:        0 B / packed:        0 B               |
|               | tree:           0 blobs / raw:        0 B / packed:        0 B               |
|               | total:          0 blobs / raw:        0 B / packed:        0 B               |
| Duration      | backup start: 2024-05-07 16:10:41 / backup end: 2024-05-07 16:10:41 / backup |
|               | duration: 36ms 296us 750ns                                                   |
|               | total duration: 36ms 624us 293ns                                             |

1 snapshot(s)

total: 1 snapshot(s)

$ rustic forget 4717f033
[INFO] using config /home/vagrant/.config/rustic/rustic.toml
[INFO] repository local:/tmp/repo: password is correct.
[INFO] using no cache

| ID       | Time       | Host           | Label | Tags | Paths               | Action | Reason      |
|----------|------------|----------------|-------|------|---------------------|--------|-------------|
| 4717f033 | 2024-05-07 | localhost-live |       |      | /home/vagrant/btrfs | remove | id argument |
|          | 16:10:41   |                |       |      | -snapshot-diff      |        |             |

[00:00:00] removing snapshots...          ████████████████████████████████████████          1/1         
$ rustic snapshots
[INFO] using config /home/vagrant/.config/rustic/rustic.toml
[INFO] repository local:/tmp/repo: password is correct.
[INFO] using no cache

total: 0 snapshot(s)

Am I missing something? Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Something isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions