Comments (16)
Currently not but thats a good idea to have a flag. Will look into it the next days :)
from autorestic.
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
from autorestic.
Hey, sry I forgot that was an issue. Probably I could rewrite the whole logging thing. It's quite ugly anyways.
from autorestic.
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
from autorestic.
from autorestic.
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
from autorestic.
Would it be worth using a proper logging framework? Something like tslog perhaps? I have zero experience with TS so there may well be better options.
from autorestic.
So. I've added a --ci
(version 0.22+) global flag which disables the interactive part.
https://autorestic.vercel.app/cli/general#--ci
@stosem you are right should not return 1 on failed. I will do that next.
Feel free to reopen if it doesnt work for you 👍
And sry for the delay, you opened the issue almost half year ago 🙈
from autorestic.
@stosem now returns with exit code 1 if a backup fails (v0.24)
from autorestic.
Thanks for this @cupcakearmy and please don't apologise for implementing a feature for free on an OSS project!! It is much appreciated.
Unfortunately it doesn't seem to work as expected, see below for how my log now looks;
Configuring Backends
^[[2K^[[1G^[[2K^[[1G^[[2K^[[1G^[[2K^[[1G^[[2K^[[1G^[[2K^[[1G^[[2K^[[1G^[[2K^[[1G^[[2K^[[1G
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:05
snapshot 3ac11269 saved
^[[2K^[[1GFiles: 0 new, 0 changed, 22690 unmodified
Dirs: 0 new, 0 changed, 605 unmodified
Added to the repo: 0 B
So it is now printing the output to the log file (before it wasn't showing anything), but there seems to be some sort of encoding issue? Any ideas?
from autorestic.
Yes. But un maintained projects always make me angry 😅
I'm sure that is the coloring. I'll comment it out if using --ci
from autorestic.
Should be fixed in 0.25
CI is building, as soon it's done it will upload it and you can autorestic upgrade
Also of course pass the --ci
flag to the cron. :)
Let me know 😊
from autorestic.
I just checked. So this happens only with the --verbose
flag. I'm going to look into it and see what happens there
Withouth the --verbose
and only --ci
flag there is a list of what happened
from autorestic.
I just tested without --verbose
and didn't notice any difference. Here is the output when running from the command line;
root@pve:/home/ben# /usr/bin/autorestic --config /etc/.autorestic.yml --ci backup --location nas-personal
Configuring Backends
b2-personal : Configuring... ⏳
b2-personal : Done ✓
rest-personal : Configuring... ⏳
rest-personal : Done ✓
Backing Up
nas-personal ▶ b2-personal : Backing up... ⏳
nas-personal ▶ b2-personal : Done ✓ (8s)
rest-personal : Backing up... ⏳
rest-personal : Done ✓ (1s)
Finished! 🎉
And then exactly the same command, but piping to a log file results in;
root@pve:/home/ben# /usr/bin/autorestic --config /etc/.autorestic.yml --ci backup --location nas-personal >> test.log
root@pve:/home/ben# cat test.log
Configuring Backends
Backing Up
Finished! 🎉
from autorestic.
@cupcakearmy sorry to keep bugging you but is this still on your radar? it is not a major by any stretch but it would be great to have more useful logging for reconciliation and validation. no problem if you have higher priority issues to attend to of course!
from autorestic.
It's on the list 🙂 I'm just burried in academic stuff right now unfortunately 😒 End of March there could be light xD
from autorestic.
Related Issues (20)
- Suggestion: Validate location after executing before hooks HOT 2
- Docker volume backup not working from within container HOT 1
- `install` and `upgrade`: allow specifying destdir
- Info command prints out secret keys
- Hooks to have access to location path HOT 1
- Cron updates timestamp even when backup fails
- `uninstall` command is broken
- Docker compose example in the docker installation guide
- 'locations[storage]' has invalid keys: forgetoption HOT 4
- Keep up with restic releases HOT 1
- Restic repository not initialized by default in GCP
- Bug: Docker volume backup to B2 fails ("context deadline exceeded") HOT 1
- forget dryRun is always false on backup task
- Support backing up Docker volumes via the REST backend
- autorestic running backup.yml,restic print 'unknown flag: --use-fs-snapshot' HOT 1
- Copy a repo
- Add a cron option to the forget/prune policies
- Suggestion: don't require 'from' key in locations that use include arguments.
- $PATH being ignored by autorestic HOT 4
- Showing during the backup the progress in percentage of every single location
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autorestic.