autorestic: log file doesn't contain backend/location details

Example below. All the dynamic text which is displayed in the console is not visible so you don’t know what backend and backup location were processed.

Is it possible to generate more flat-file-log-friendly output via a switch/flag?

Configuring Backends

Backing Up
Files:           0 new,     0 changed,     1 unmodified
Dirs:            0 new,     0 changed,     0 unmodified
Added to the repo: 0 B

processed 1 files, 0 B in 0:04
snapshot 8a093c2a saved

Finished! ð

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 16 (15 by maintainers)

Most upvoted comments

So… it’s been a long time. I’ve rewritten the whole thing in Go the past week and it’s way more stable (and smaller). @sumnerboy12 should be fixed. Feel free to repoen if that is not the case. Note the (small) upgrade guide https://autorestic.vercel.app/upgrade

No problems! Sorry to be pushy! Best of luck with your studies.

On Wed, 10 Feb 2021, 04:21 Nicco, notifications@github.com wrote:

It’s on the list 🙂 I’m just burried in academic stuff right now unfortunately 😒 End of March there could be light xD

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/cupcakearmy/autorestic/issues/28#issuecomment-776018070, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGTR2ROYQVKNYV35GEB54LS6FHHBANCNFSM4PGHMYWQ .

Ok - the output is cleaned up but there is no mention of which backend/location is being processed. It just looks like the raw restic output I think. Any chance we can get more detailed logging of what is actually being processed? Very hard to tell in the log below what repo has been backed up etc. NOTE: this is running with --verbose.

Configuring Backends

Backing Up
Files:           0 new,     0 changed, 22690 unmodified
Dirs:            0 new,     0 changed,   605 unmodified
Added to the repo: 0 B

processed 22690 files, 86.238 GiB in 0:13
snapshot 28bfb301 saved
Files:           0 new,     0 changed, 22690 unmodified
Dirs:            0 new,     0 changed,   605 unmodified
Added to the repo: 0 B

processed 22690 files, 86.238 GiB in 0:02
snapshot a2c0c4b1 saved

Finished!  ^=^n^i

Hey, sry I forgot that was an issue. Probably I could rewrite the whole logging thing. It’s quite ugly anyways.

Moreover, I can’t detect failed tasks with Ansible. autorestic always return 0 (success) as rc. Doesn’t matter task was succeeded or not. And I can’t catch Failed! on stdout:

Ansible stdout:

            "\u001b[4m\u001b[90m",
            "Configuring Backends\u001b[39m\u001b[24m",
            "\u001b[2K\u001b[1G\u001b[90m\u001b[4m",
            "Backing Up\u001b[24m\u001b[39m",
            "Files:           0 new,     1 changed,     0 unmodified",
            "Dirs:            0 new,     0 changed,     0 unmodified",
            "Added to the repo: 379 B",
            "",
            "processed 1 files, 2.500 KiB in 0:00",
            "snapshot bc536bdb saved null does not exist, skipping",
            "\u001b[2K\u001b[1GFiles:           0 new,     0 changed,     1 unmodified",
            "Dirs:            0 new,     0 changed,     0 unmodified",
            "Added to the repo: 0 B  ",
            "",
            "processed 1 files, 33 B in 0:00",
            "snapshot ed75da09 saved null does not exist, skipping",
            "\u001b[2K\u001b[1Gnull null",
            "\u001b[2K\u001b[1G\u001b[4m",
            "Finished!\u001b[24m 🎉"

While real output contains errors:

Configuring Backends
local-storage : Done ✓

Backing Up
test_docker ▶ local-storage : Backing up... ⏳Files:           0 new,     1 changed,     0 unmodified
Dirs:            0 new,     0 changed,     0 unmodified
Added to the repo: 379 B

processed 1 files, 2.500 KiB in 0:00
snapshot 2ce6f9b7 saved null does not exist, skipping
test_docker ▶ local-storage : Failed! (1s) null does not exist, skipping
test_home ▶ local-storage : Backing up... ⏳Files:           0 new,     0 changed,     1 unmodified
Dirs:            0 new,     0 changed,     0 unmodified
Added to the repo: 0 B

processed 1 files, 33 B in 0:00
snapshot 0ac6f2e1 saved null does not exist, skipping
test_home ▶ local-storage : Failed! (771ms) null does not exist, skipping
test_web ▶ local-storage : Backing up... ⏳null null
test_web ▶ local-storage : Failed! (5ms) null

Currently not but thats a good idea to have a flag. Will look into it the next days 😃