Description
This was on my own todo-List but I am far away from implementing this myself. So just for documentation (not for hurring it up!) I describe this feature here.
The problem
I don't know if my BackInTime (BIT) does a backup job or not even I don't know when it did it.
From time to time I open BIT and open each profile and checking the left list-view with the snapshot dates. Also for this I have to boot my backup-NAS because BIT won't show my anything without a backup destination available.
Solution
I want to aks BIT with one click or one command about the last successfull backup of all exiting jobs. There could be a .get_last_snapshot_dates()
resulting in this
{'music_backup': time_struct<>,
'other_backup_profile': time_struct<>}
This could be used by another methode pretty printing it to stdout
(for command-line access) or by the GUI or by the plugin-API. There could be plugins showing the result in systray or sending an email about it or generating an RSS feed or make a robot dance the result.
Activity
buhtz commentedon Sep 26, 2022
@emtiu My first impulse was to ask for "still relevant?" and tag this. Then I saw my own face. 😆
This feature is still in my mind. Just do something like
backintime --status
and BIT gives you (in json format!) the last dates for each snapshot profile and maybe some more information. You can write your own daily running checker script just to check if one of the profiles get outdated because of unknown and uncaught errors.Tag: Feature
[-]FeatureRequest: Activity log[/-][+]Feature Request: Activity or status information's about all snapshot profiles (in machine readable JSON format)[/+]buhtz commentedon Dec 14, 2023
This feature give users the opportunity to ask BIT (on command line) about the status of all existing profiles in a machine readable way. This can be used in (e.g. via cron executed) scripts to monitor BIT and start something (e.g. send mail or flash a big red light) when something is wrong.
aryoda commentedon Dec 14, 2023
This feature request looks similar to "log aggregator" functionality.
I think a centralized summary of all result states is very helpful.
Still it requires a functionality in BiT (or outside) to inform the user based on this file and this currently the pain point IMHO.
We have user-callback scripts for that to trigger actions per snapshot directly to
send emails in case of problems (I don't like emails for privacy reasons if they contain paths and file names):
https://github.com/bit-team/user-callback/blob/master/user-callback.sendmail
send a desktop notification (works only on desktop systems I guess):
https://github.com/bit-team/user-callback/blob/master/user-callback.notify
We could "lift" this functionality into a BiT config + GUI for normal users but configuring a
sendmail
orsmtp
profile could be overkill.s4moore commentedon Jan 19, 2025
Hello Christian,
I have started working on this and have a few questions.
[-]Feature Request: Activity or status information's about all snapshot profiles (in machine readable JSON format)[/-][+]Activity or status information's about all snapshot profiles (in machine readable JSON format)[/+]buhtz commentedon Jan 19, 2025
Hi Samuel,
thank you for working on this. A snapshot specific summary is nice to have, too. But what I had in mind is an overview of all snapshots.
I would suggest first to stick to the json output on command line. I am assuming this is tricky enough. We can think about a nice visualization in the GUI later.
Never thought about it. BIT is a bit special with its "commands" (backup, shutdown, smart-remove, snapshots-path, ...). I would suggest to stick to it.
This should output nice formatted and human readable output.
But add another switch to it, to make it JSON
Or we could make json the default and add
--human-readable / -r
(-h
is reserved) to it. Not sure about it.Maybe
status
is a better command thansummary
? I often ask such question on the mailing list to get opinions from users.The use case is to give users the opportunity to be informed about their current "backup status". It often happen to me and others that BIT produce errors for several weeks and no one notice them. Of course there are several approaches to take this into account. But having a machine readable answer to "how are my backups" would be very nice. This can be used by other tools (and BIT itself) to track the backup status and warn if something goes wrong.
EDIT: To add the new command you need to modify the argparse related code. That code is bit message. Feel free to refactor it and maybe move it to its own module (e.g.
common/args.py
). But when you refactor please do this in a separate PR. And this won't get merged in the upcoming release. This is because I would like to keep the next release as stable as possible.s4moore commentedon Jan 25, 2025
Hi Christian,
I have made a start on this but after reading your edit, I'm not sure that I'm going about this correctly. Should I submit a pr so you can see what I've done so far and let me know if my approach makes sense or if I need to make changes? (I have the overall status working but have not yet implemented profile specific status)
buhtz commentedon Jan 25, 2025
Just open the PR and try to explain the feature you have added.