Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: LuckyBackup cronjob schedule is not working

  1. #1

    Default LuckyBackup cronjob schedule is not working

    Cronjob in LuckyBackup is not working.
    It was working until I have changed an hour of daily schedule. It was working when I upgraded from Leap 42.3 to Leap 15.
    Cron in services manager is switched on and active.

    I removed my default schedule and I created new one but it didn't work.
    What can I do?

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,157

    Default Re: LuckyBackup cronjob schedule is not working

    At least tell and show us some technical details!

    Where is the cron entry configured, what does it look like?

    E.g. with
    Code:
    crontab -l
    when you confugured in a (which) users crontab,
    or
    Code:
    cat /etc/crontab
    when you configured in the system crontab,

    or similar when it is in one of the /etc/cron.* directories.
    Henk van Velden

  3. #3

    Default Re: LuckyBackup cronjob schedule is not working

    crontab -l
    Code:
    krzysiek@linux-gfpk:~> crontab -l
    # DO NOT EDIT THIS FILE - edit the master and reinstall.
    # (/home/krzysiek/.luckyBackup/schedule/luckyCron.txt installed on Thu Jun 28 05:59:48 2018)
    # (Cronie version 4.2)
    # DO NOT EDIT THIS FILE - edit the master and reinstall.
    # (/home/krzysiek/.luckyBackup/schedule/luckyCron.txt installed on Thu Jun 28 05:57:39 2018)
    # (Cronie version 4.2)
    # DO NOT EDIT THIS FILE - edit the master and reinstall.
    # (/home/krzysiek/.luckyBackup/schedule/luckyCron.txt installed on Thu Jun 28 05:49:58 2018)
    # (Cronie version 4.2)
    # DO NOT EDIT THIS FILE - edit the master and reinstall.
    # (/home/krzysiek/.luckyBackup/schedule/luckyCron.txt installed on Wed Jun 27 19:59:06 2018)
    # (Cronie version 4.2)
    # DO NOT EDIT THIS FILE - edit the master and reinstall.
    # (/home/krzysiek/.luckyBackup/schedule/luckyCron.txt installed on Wed Jun 27 19:41:37 2018)
    # (Cronie version 4.2)
    # DO NOT EDIT THIS FILE - edit the master and reinstall.
    # (/home/krzysiek/.luckyBackup/schedule/luckyCron.txt installed on Wed Jun 27 19:40:34 2018)
    # (Cronie version 4.2)
    # DO NOT EDIT THIS FILE - edit the master and reinstall.
    # (/home/krzysiek/.luckyBackup/schedule/luckyCron.txt installed on Wed Jun 27 19:28:21 2018)
    # (Cronie version 4.2)
    # DO NOT EDIT THIS FILE - edit the master and reinstall.
    # (/home/krzysiek/.luckyBackup/schedule/luckyCron.txt installed on Wed Jun 27 19:11:12 2018)
    # (Cronie version 4.2)
    # DO NOT EDIT THIS FILE - edit the master and reinstall.
    # (/home/krzysiek/.luckyBackup/schedule/luckyCron.txt installed on Wed Jun 27 18:40:46 2018)
    # (Cronie version 4.2)
    # DO NOT EDIT THIS FILE - edit the master and reinstall.
    # (/home/krzysiek/.luckyBackup/schedule/luckyCron.txt installed on Wed Jun 27 18:40:40 2018)
    # (Cronie version 4.2)
    # DO NOT EDIT THIS FILE - edit the master and reinstall.
    # (/home/krzysiek/.luckyBackup/schedule/luckyCron.txt installed on Wed Jun 27 18:38:34 2018)
    # (Cronie version 4.2)
    # DO NOT EDIT THIS FILE - edit the master and reinstall.
    # (/home/krzysiek/.luckyBackup/schedule/luckyCron.txt installed on Wed Jun 27 18:27:37 2018)
    # (Cronie version 4.2)
    # DO NOT EDIT THIS FILE - edit the master and reinstall.
    # (/home/krzysiek/.luckyBackup/schedule/luckyCron.txt installed on Wed Jun 27 18:27:03 2018)
    # (Cronie version 4.2)
    # DO NOT EDIT THIS FILE - edit the master and reinstall.
    # (/home/krzysiek/.luckyBackup/schedule/luckyCron.txt installed on Thu Jun  7 10:40:59 2018)
    # (Cronie version 4.2)
    # DO NOT EDIT THIS FILE - edit the master and reinstall.
    # (/home/krzysiek/.luckyBackup/schedule/luckyCron.txt installed on Sat Jan 13 11:21:35 2018)
    # (Cronie version 4.2)
    # DO NOT EDIT THIS FILE - edit the master and reinstall.
    # (/home/krzysiek/.luckyBackup/schedule/luckyCron.txt installed on Sat Jan 13 11:19:08 2018)
    # (Cronie version 4.2)
    
    # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ luckybackup entries ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    0 17 * * *      env DISPLAY=:0 /usr/bin/luckybackup --silent --skip-critical /home/krzysiek/.luckyBackup/profiles/default.profile > /home/krzysiek/.luckyBackup/logs/default-LastCronLog.log 2>&1
    # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ end of luckybackup entries ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    krzysiek@linux-gfpk:~>
    cat /etc/crontab
    Code:
    SHELL=/bin/sh
    PATH=/usr/bin:/usr/sbin:/sbin:/bin:/usr/lib/news/bin
    MAILTO=root
    #
    # check scripts in cron.hourly, cron.daily, cron.weekly, and cron.monthly
    #
    -*/15 * * * *   root  test -x /usr/lib/cron/run-crons && /usr/lib/cron/run-crons >/dev/null 2>&1

  4. #4
    Join Date
    Oct 2008
    Location
    Glasgow, Scotland
    Posts
    1,134

    Default Re: LuckyBackup cronjob schedule is not working

    Apologies if this is too obvious, but:
    Quote Originally Posted by rektal View Post
    Cronjob in LuckyBackup is not working.
    It was working until I have changed an hour of daily schedule.
    How did you do this? Anything other than:
    Code:
    krzysiek@linux-gfpk:~> crontab -e
    could have rendered the crontab inoperable.
    ~Thank you for sharing an interesting problem.
    --
    slàinte mhath,
    rayH

  5. #5

    Default Re: LuckyBackup cronjob schedule is not working

    It was working about 3-4 days ago.
    Then Luckybackup stopped doing its schedule.
    I did cron schedule on 13 of January, then upgraded system from 42.3 to 15.0 , then added one folder to backup on 7th of June. It was working ok until it stopped few days ago.
    Then I tried to change an hour of schedule but it didn't work.
    I reinstaled LuckyBackup but it did not work.

    I tried to use snapshot form 13 of June but it did not repair LuckyBackup.
    I can only backup files manually now. Schedule do not work.

  6. #6
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,157

    Default Re: LuckyBackup cronjob schedule is not working

    Thanks for posting. It seems that the LuckyBackup cron entry is in the personal crontab of user
    krzysiek.

    I am not a LuckyBackup user, thus I have no idea if that is correct (I only asked you to post the crontabs because you had only some story telling without any information going with it).

    Thus when the user himself is the one to run that application that is allright. But when making backups should be done on the system level it must be run by root of course.

    Also the crontab looks very strange. The first three line are repeted manyfold. They should be there only once. Thus one can aks the question: how is this mess possible?
    Also, like said above, the only correct way to make changes to ones crontab is using
    Code:
    crontab -e
    Although, I assume that some other tools can do it correct also, but in any case NOT by using some editor directly.
    Henk van Velden

  7. #7

    Default Re: LuckyBackup cronjob schedule is not working

    I have cleaned up this mess in cron . This link helps me https://askubuntu.com/questions/7935...ile-to-default
    Now it looks like:

    Code:
    krzysiek@linux-gfpk:~> crontab -l
    # DO NOT EDIT THIS FILE - edit the master and reinstall.
    # (/tmp/tmpnt10s2sx installed on Thu Jun 28 14:36:36 2018)
    # (Cronie version 4.2)
    # DO NOT EDIT THIS FILE - edit the master and reinstall.
    # (/home/krzysiek/.luckyBackup/schedule/luckyCron.txt installed on Thu Jun 28 14:19:47 2018)
    # (Cronie version 4.2)
    
    # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ luckybackup entries ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    21 14 * * *     env DISPLAY=:0 /usr/bin/luckybackup --silent --skip-critical /home/krzysiek/.luckyBackup/profiles/default.profile > /home/krzysiek/.luckyBackup/logs/default-LastCronLog.log 2>&1
    # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ end of luckybackup entries ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    #Back In Time system entry, this will be edited by the gui:
    0 15 * * * /usr/bin/nice -n19 /usr/bin/ionice -c2 -n7 /usr/bin/backintime backup-job >/dev/null
    Unfortunately LuckyBackup is still not doing backups with schedule. I think that this is LuckyBackup's problem with cron.

    I tried to backup my files with Back In Time with schedule.
    Back In Time works fine. Cron works. Schedule works.

  8. #8
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,157

    Default Re: LuckyBackup cronjob schedule is not working

    You say "LuckyBackup is still not doing backups with schedule.", but how do you know?

    I see that the entry has a redirection to a (log) file. What is in there?

    Did you try to execute
    Code:
    env DISPLAY=:0 /usr/bin/luckybackup --silent --skip-critical /home/krzysiek/.luckyBackup/profiles/default.profile > /home/krzysiek/.luckyBackup/logs/default-LastCronLog.log 2>&1
    from a terminal window?

    I also see that the environment variable DISPLAY is set to :0. That is normaly done to tell a program on which display to create it's windows.
    Now it could be that this is not a GUI program at all, but then why setting DISPLAY?

    When it is a GUI program, this will not work. First because this is started by cron in the background it is not even sure that there is a GUI session at all. And when there is a GUI session, it is not given that user krzysiek is owning that session. And even when user krzysiek is running a GUI session on display :0, it is not sure that he allows windows to be opened on his session from outside. All very tricky and a bit strange to me.
    Henk van Velden

  9. #9

    Default Re: LuckyBackup cronjob schedule is not working

    I believe it has to do with you trying to make luckyBackup display the system tray icon and it is failing before luckyBackup even runs. So, you get no logs.

    It looks like you are creating the cron job from the luckyBackup interface. If that is true then for now check the box that says: Console mode

    I found that in the schedule section right below this one in the manual:

    http://luckybackup.sourceforge.net/manual.html#terminal

    If that fixes it then we have eliminated it being a cron issue.

    I have to run to an appointment but I will leave a puzzle for others who maybe able to then give you the correct answer. Otherwise I will have to work on this when I get back:


    The puzzle:

    Assume the time is 8:55 AM and echo $DISPLAY returns :0

    If I enter this crontab entry in my logged on user's crontab:
    0 9 * * * DISPLAY=:0 /usr/bin/konsole

    FYI this does not work either:
    0 9 * * * export DISPLAY=-:0 && /usr/bin/konsole

    Then at 9 AM a konsole should display on my desktop. Running jounalctl -f and you will see the error.

    That appears to be the OP's issue.

    Have fun.
    I don’t have anything to hide, but I don’t have anything I want to show you either.

  10. #10

    Default Re: LuckyBackup cronjob schedule is not working

    OK, here is your issue:

    I really don't know if this is an X, KDE, or Plasme requirement, but you need 4 things:

    1. IPv6 must be enabled. A GUI in a cron must connect to the DBUS, and it seems to do it over IPv6. Since you are running this as yourself luckily crom knows where the DBUS is. If you want to know then:
    Code:
    echo $DBUS_SESSION_BUS_ADDRESS
    2. The cron must know where your Xauthority key is. Since this is the key to coneecting to your display (e.g. password) cron does not have that variable set. You can find it by:
    Code:
    echo $XAUTHORITY
    Finally cron must know what your DISPLAY is. Again, you find this by:
    Code:
    echo $DISPLAY

    Assuming you have all of that your crontab should look something like this:

    Code:
    0 17 * * *  DISPLAY=:0 XAUTHORITY=/home/krzysiek/.local/share/sddm/.Xauthority /usr/bin/luckybackup --silent --skip-critical /home/krzysiek/.luckyBackup/profiles/default.profile > /home/krzysiek/.luckyBackup/logs/default-LastCronLog.log 2>&1

    You can ignore this last part, but for completeness if someone wants to run a GUI as root and display it to another user then the syntax is something like is (I have not tested this, but it would get someone started):

    Code:
    23 15 * * *  DISPLAY=:0  DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus  XAUTHORITY=/home/d3vnull/.local/share/sddm/.Xauthority /usr/bin/konsole
    NOTE: Be careful here that line maybe would be better with a & on the end to insure you don't hang the DBUS.

    Anyway, thanks for the question. it was an interesting problem to solve.
    I don’t have anything to hide, but I don’t have anything I want to show you either.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •