-
Notifications
You must be signed in to change notification settings - Fork 203
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
old crontab entries not removed #3
Comments
(by rich-home-deactivatedaccount) |
(by danleweb) |
(by mikelito) I am currently using Clearly it has the problem that it would remove the line following system_entry_message regardless of its content, which is maybe bad. Thanks for looking into this! |
(by rich-home-deactivatedaccount) This awk script should work: '/#Back In Time system entry, this will be edited by the gui:/ {skip=1} /._/ {if (!skip) print $0} /._backintime.*/ {skip=0}' -It first checks for the BackInTime comment, if it is present it starts skipping lines Example output: richard@bagheera: Line 741 in config.py would change from |
(by yehaa) BackInTime Version 0.9.99.80 Kubuntu 10.10 The awk line posted by Richard de Boer works wonderfully, so I'd give that a +, I'm not fluent enough in shell-scripting to analyze that line in depth. |
On saving the preferences, backintime creates a new crontab entry, but fails to remove the old one.
From bug 451811 I figured it might be useful to paste this output as well(this was after manual removal of the duplicate entry, I copied this regex from config.py):
richard@bagheera:~$ crontab -l | grep -Pv '(?s)#Back In Time system entry, this will be edited by the gui:.*?backintime'
Fetch mail from Ziggo POP server to local storage
*/5 * * * * /usr/bin/getmail >/dev/null 2>&1
Back In Time system entry, this will be edited by the gui:
0 * * * * nice -n 19 ionice -c2 -n7 /usr/bin/backintime --profile "Main profile" --backup-job >/dev/null 2>&1
Looks like even with the -P option and (?s) grep doesn't find the Backintime lines. I also tried it without the ? in front of backintime, as it looked wrong to me(I might be mistaken there), but got the same result.
Removing the last part did result in grep removing the comment line:
richard@bagheera:~$ crontab -l | grep -Pv '(?s)#Back In Time system entry, this will be edited by the gui:.*?'
Fetch mail from Ziggo POP server to local storage
*/5 * * * * /usr/bin/getmail >/dev/null 2>&1
0 * * * * nice -n 19 ionice -c2 -n7 /usr/bin/backintime --profile "Main profile" --backup-job >/dev/null 2>&1
Using:
Back in Time 1.0
GNU grep 2.6.3
Python 2.6.6
Linux bagheera 2.6.35-22-generic #35-Ubuntu SMP Sat Oct 16 20:36:48 UTC 2010 i686 GNU/Linux
Imported from Launchpad using lp2gh.
The text was updated successfully, but these errors were encountered: