-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check if Include folders/files do exists (in case they are removed) #1718
base: dev
Are you sure you want to change the base?
Conversation
Solution b) when start taking a snapshot the include list should be checked of existence first and warn about missings. reference: bit-team#1586
This is not complete yet, but if possible I would like some feedback before finishing it. Are the messages good? And I am wondering if the qt warning is ok (it is asking a confirmation before continuing instead of just warning). And I didn't implement a) for no big reason. I am still getting familiar with the code and b) was something that was more clear for me. I could try a) in a future PR. And how you normally do translations? I was planning to translate all other languages using some automated tool (Copilot) but I wanted to confirm how you guys do it normally... |
Dear Rafael, I added some comments and suggestions to the code. I am not sure about the whole solution. I would suggest to further discuss it in the related issue #1586. I will set the PR into Draft mode to state the the solution is not finished. Best, |
Co-authored-by: buhtz <c.buhtz@posteo.jp>
Co-authored-by: buhtz <c.buhtz@posteo.jp>
Co-authored-by: buhtz <c.buhtz@posteo.jp>
Co-authored-by: buhtz <c.buhtz@posteo.jp>
I appreciate a lot for the review. It clarified a lot of questions and taught me some good lessons (I would never have thought about RTL issues on translations). And I am happy about not use the camel case :) I will do the fixes from the review and wait for any suggestion in the original issue. Thank you very much 🙏 |
refactor btn snapshot & improve translate message Co-authored-by: buhtz <c.buhtz@posteo.jp>
Does anyone know how to trigger the systray-icon message-bubbles via BIT? I tried with "Snapshot.setTakeSnapshotMessage(1, 'FOO BAR')" but without success. This message appears in the status bar of the main window. |
Me neither. When I started to work on the translation task I thougt it is easy. I learned things like that from translators and the community around them while trying to attract translators to BIT. |
I am still checking on Systray. TBH I didn't know we had a systray (it is not running fine here). But I will keep trying to understand it in order to make the fix. |
Our systray icon started as stand-alone process backintime/qt/plugins/systrayiconplugin.py Lines 86 to 93 in 99081af
and it calls every second a function to update the status: backintime/qt/qtsystrayicon.py Lines 160 to 201 in 99081af
It reads the current "snapshot message" from a file: backintime/common/snapshots.py Line 96 in 99081af
So to change the status message of the systray icon the message file's content must be changed, I guess (= not tried) with: backintime/common/snapshots.py Line 151 in 99081af
The message is only shown while a snapshot is taken otherwise the systray icon is closed again (it is not running permanently - which is what I would implement in the future to also get rid of the root systray icon issues due to hijacking the X11 session of a user). |
@rafaelhdr Thanks a lot for your contribution and helping us to improve BiT! @rafaelhdr @buhtz I am wondering if the validation logic to check for existing includes does really work in every scenario, esp. when the include path is mounted via a I know this a quite rare scenario (using a For a simple The BiT function to mount for using a profile is this: backintime/common/pluginmanager.py Line 165 in 99081af
|
I do see. This is a longer story. |
BTW: I think to correctly test the mount/unmount user-callback calls via the BiT GUI my old patch must be applied: Perhaps it is time to push this patch now as work-around (even though it is in-efficient because it mounts/unmounts far too often)... |
You mean if the "backup source" is an external drive for example and present all the time? |
Yes, check for existing include folders after the user-callback script was called to "mount" everything. Or another example: The source is an encrypted container (TrueCrypt/VeraCrypt) and shall be mounted only for backups |
Thank you for all your help, guys 🙏 About the Systray, I think I got the idea. I was able to run it locally, and I will try to add something.Thank you for the directions. BTW, I just noticed the systray after you guys mentioned it. I was able to make it work after adding an extension to Gnome (https://extensions.gnome.org/extension/615/appindicator-support/). Do you think it is worth mentioning in the docs? About the user-callback suggestion, I think I got it... Just to be sure, these are the logs from my local tests: $ backintime backup --profile-id 4
> Back In Time
> Version: 1.4.4-dev.7472f54d
(...)
> WARNING: The following folders are missing: /home/rafaelhdr/Mocks2
> INFO: Lock
> INFO: Mountpoint /home/rafaelhdr/.local/share/backintime/mnt/7AE1B8E6/mountpoint is already mounted
> INFO: Take a new snapshot. Profile: 4 khadas 2
(...) So, this |
Hey guys, Thank you for all the support. I was able to display the error with this: We could consider it as an error, right? (if not, I could replace the And I moved the check for after the mount. I hope it is good. Let me know if you think we could change it, but also feel free to change anything :) |
FYI: I am AFK for one week and will review this PR when I am back... |
Solution b) when start taking a snapshot the include list should be checked of existence first and warn about missings.
reference: #1586