Profile id not found with anacron

Bug #1316292 reported by Tomáš Pikálek on 2014-05-05
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Back In Time
Fix Released

Bug Description

In bit 1.1 anacron scheduling does not work - in log it writes:
Anacron started on 2014-05-05
Will run job `2_Disk' in 0 min.
Jobs will be executed sequentially
Job `2_Disk' started
Job `2_Disk' terminated (mailing output)
Normal exit (1 job run)

In mailing output there is "Profile id not found: 2" error (or similar depending on the id of the profile).

If I manually run "backintime --profile-id 2 --backup-job" in command line, it works. Even if I run manually command "test -e /home/user/.config/backintime/anacrontab && /usr/bin/anacron -s -t /home/user/.config/backintime/anacrontab -S /home/user/.local/share/backintime/anacron", backup is done.

I use openSUSE 13.1 and bit 1.1 rev 915. When I switch back to older version of bit 1.1 (I'm not sure about revision from which I have built the rpm packages, I think 906), I have no problem at all.

I am not sure what causes this problem, but I think bit cannot find config file when using anacron.

If you tell me what exact revision could cause it, I can test it.

Germar (germar) wrote :

Thanks for testing and reporting! It could be caused by the port to python3 in rev 910. I'm not sure. But I'll have a look

Tomáš Pikálek (tpikalek) wrote :

Sorry for a long delay.
Revision 909 works just fine (manual and anacron backups), revision 910 does not work at all (it cannot read password). Problem with 910 was fixed in 911, but with 911 only manual backup works, no anacron. Same problem with 925. So the problem is caused by the port to Python 3.

Germar (germar) wrote :

Hi Tomáŝ,
I really appreciate your beta testing! Thanks.
I can't reproduce it here on Ubuntu 14.04. Can you please try again with a new profile (just rename ~/.config/backintime and ~/.local/share/backintime)? If this doesn't help I'll get my self an openSUSE VM to test it.


Tomáš Pikálek (tpikalek) wrote :

Hi, I tried bit in VM on fresh installed openSUSE 13.1 KDE (with updates) with new profile. Local backup works just fine. Problem is when I use SSH.
I am not sure, but I think password for SSH key cannot be read from KWallet when using anacron. As i wrote, if I run the command for cron manually in console, backup works.

By the way, I cannot select path to private SSH key. When I click on "folder" icon next to the path, it does not do anything and writes in console:
Traceback (most recent call last):
  File "/usr/share/backintime/qt4/", line 1375, in on_btn_ssh_private_key_file_clicked
    if not old_file.isEmpty():
AttributeError: 'str' object has no attribute 'isEmpty'

Tomáš Pikálek (tpikalek) wrote :

I found it is probably a problem in environment variables. If I copy output of "env" command to anacrontab, it works ok. As soon as I have time, I will try to determine, which variables are important.

Tomáš Pikálek (tpikalek) wrote :

Interesting, it seems it was LANG variable. Ading LANG=cs_CZ.UTF-8 to my crontab fixes the issue. This is probably not bit issue, but some problem with system configuration, so you can close this bug. Thank you.

Problem with selecting private SSH key persists.

Germar (germar) wrote :

Thanks again for testing. I already cache and reload some environ vars. I can add LANG, too.

'isEmpty' AttributeError is a good one :-) It's also because of changing to Python3 as python3-pyqt4 doesn't have QStrings anymore. It uses str instead. But str doesn't have isEmpty. I fixed it in rev 926.

Tomáš Pikálek (tpikalek) wrote :

AttributeError fixed, thank you.

There is another weird thing when running from anacron – icon in panel is blank. Icon is there (on mouse hover I can see info from bit), but it is blank. It is probably also env issue, when I run bit manually, icon is there.

Also – is it right that todays date is written into .local/share/backintime/anacron/1_profile even if the backup failed? For example, when I start my laptop in the morning at work, it cannot backup to my NAS at home. When I come home, it does not try to backup again, because it thinks that one backup was successfully completed in the morning.

Germar (germar) wrote :

Systray icon is still making some troubles with cron/anacron, I know. With Ubuntu it's even worth because it raises an exception. I wasn't able to find the root of this yet.

anacron doesn't check the returncode before writing the timestamp. Or I didn't found a way yet to tell anacron to do so ;-)
Maybe I've to rewrite the anacron part to be more flexible.

Germar (germar) wrote :

Systray icon issue should be fixed with rev 936. It was again missing env vars GNOME_DESKTOP_SESSION_ID and KDE_FULL_SESSION

Changed in backintime:
status: New → Fix Committed
milestone: none → 1.1.0
Germar (germar) on 2015-01-15
Changed in backintime:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments