Skip to content

rustic snapshots does not render multi-line descriptions correctly #926

Open

Description

@florensie

When backing up with --description-from description.txt, where description.txt is a file with multiple lines of text. The output of restic snapshots --long is broken:

C:\Users\Florens\test\stuff>rustic snapshots -r ../repo --long ad78594f682ca4445cb4677dc5891952396db739d04b3f20d770e6ad2faea371
using no config file (.\rustic.toml doesn't exist)
enter repository password:
[INFO] repository local:../repo: password is correct.
[INFO] using cache at C:\Users\Florens\AppData\Local\rustic\dafc41415e5541942621e0127f4fb6d6da8ac43445ef7edaf76054ec63f8b420
| Snapshot      | ad78594f682ca4445cb4677dc5891952396db739d04b3f20d770e6ad2faea371                                                                        |
| Time          | 2023-11-05 11:46:55                                                                                                                     |
| Generated by  | rustic v0.5.4                                                                                                                           |
| Host          | test                                                                                                                                    |
| Label         |                                                                                                                                         |
| Tags          |                                                                                                                                         |
| Delete        | not set                                                                                                                                 |
| Paths         | C:\Users\Florens\test\stuff                                                                                                             |
| Parent        | 6b7f880307692b889be98de56fb007827d12276c66a0ed8cff0f5ba4c07158c4                                                                        |
|               |                                                                                                                                         |
| Command       | C:\Users\Florens\scoop\apps\rustic\current\rustic.exe backup -r ../repo --host test --password  --description-from ../description.txt . |
| Source        | files: 1 / dirs: 6 / size: 6 B                                                                                                          |
|               |                                                                                                                                         |
| Files         | new:          0 / changed:          0 / unchanged:          1                                                                           |
| Dirs          | new:          0 / changed:          0 / unchanged:          6                                                                           |
|               |                                                                                                                                         |
| 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: 2023-11-05 11:46:55 / backup end: 2023-11-05 11:46:55 / backup duration: 3ms 160us 600ns                                  |
|               | total duration: 7ms 797us 600ns                                                                                                         |
                                                                                                                                   |
|               | line2                                                                                                                                   |

1 snapshot(s)

The content of description.txt for this test was:

line1
line2

Additionally, it doesn't seem possible to create multi-line descriptions without a description file. I tried doing --description line1\r\nline2, but the escape sequences were included as-is in the output.

Activity

  1. added
    S-triageStatus: Waiting for a maintainer to triage this issue/PR
    on Nov 5, 2023
  2. changed the title [-]`restic snapshots` does not render multi-line descriptions correctly[/-] [+]`rustic snapshots` does not render multi-line descriptions correctly[/+] on Nov 5, 2023
  3. aawsome commented on Nov 5, 2023

    @aawsome
    Member

    Thanks a lot for this issue! Seems we need to improve this.

  4. added
    C-bugCategory: Something isn't working as expected
    A-ui-uxArea: Related to user interfaces and user experience
    and removed
    S-triageStatus: Waiting for a maintainer to triage this issue/PR
    on Nov 5, 2023
  5. magrathean-uk commented on Aug 1, 2026

    @magrathean-uk
    Contributor

    I opened a focused draft PR for this: #1864

    It normalizes CRLF descriptions before terminal table rendering so Windows line endings do not overwrite rows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ui-uxArea: Related to user interfaces and user experienceC-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