backintime
backintime copied to clipboard
Add --debug checkbox to BiT GUI for cron jobs
Currently to create debug output in case of problems the user must manually edit the crontab file via
Use sudo crontab -e and add --debug to the backintime job entries (move cursor after backintime and insert --debug - this is vi so press i to enter the edit mode, after editting press ESC then :wq to save the changes...
and this change will be overwritten again if the profile is edited in the GUI.
For better usability add a checkbox into the General > Schedule block
[x] Enable logging of debug messages
with a tooltip text
Write debug-level messages into the system log. Warning: Use only to diagnose problems since it creates a lot of output
I believe to have solved this, I have made a local branch for my changes as is described in CONTRIBUTING.md but I can't push it. I will summarize my changes below:
- Common:
- Added
debugScheduleansetDebugSchedulemethods to config - Added
or self.debugSchedule()toconfig::cronCmdin the condition for appending '--debug' to the command
- Added
- QT:
- Added
QCheckBoxtoSettingsDialog::__init__ - Added necessary code to
SettingsDialog::updateProfileandSettingsDialog::saveProfileto save anr update the state ofconfig.debugSchedule
- Added
How should I proceed further?
I Kosta, great to hear.
It seems we can improve the CONTRIBUTING.md because the clone/fork step is missing in the description. Looking into your repository list at GitHub it seems you have not forked backintime. Do I assuming it correct that you git clone from bit-team/backintime?
Keep your current local copy with your modifications. Don't delete it.
First you have to "fork" bit-team/backintime. On our landing page you do find a "fork" button.
After this process is finished you will have your own backintime repo. https://github.com/stcksmsh/backintime
Now you clone your remote repo to your local machine via $ git clone [email protected]:stcksmsh/backintime.git. Don't overwrite your first local repo. Just keep them side by side.
Now you can proceed further with the steps described in the CONTRIBUTING.md. Create your own branch (git checkout --branch fix/1616debug) is important.
Now you decide yourself. You can try using some git magic to merge the modifications from your frist local repo into your new one. Or you just copy and paste the py files from one to another. For the beginning I would suggest to just copy and paste the modified py files.
If all modifications are commited you do git push and follow the instructions of git will give you. Git always give kind of warning when doing the first push on a new branch.
Then go to https://github.com/stcksmsh/backintime and you might see a colored box in the beginning mention the new pushed branch and suggesting to open a PR.
Feel free to ask back.
Thank you for the help, I have now created a pull request. If there is anything more I should do please let me know. In regards to the CONTRIBUTING.md, I did not create any new tests, since I did not know exactly how to do so, but if needed I would learn (I am going to have to eventually anyway...) and make them.