helpstoreBackup - Support: sr #108231, storeBackup does not run through...

 
 

sr #108231: storeBackup does not run through after being called by anacron

Submitter:  None
Submitted:  Mon 14 Jan 2013 11:10:54 PM UTC
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  None
Privacy:  Public Assigned to:  None
Originator Email:  -email is unavailable- Open/Closed:  Open
Operating System:  GNU/Linux
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       

 

Wed 16 Jan 2013 05:44:55 PM UTC, comment #4: 

Hi Heinz-Josef,

I am very sorry that I first looked for the error in storeBackup without doing enough debugging first…

After some trying around by myself I found out that the whole error was thrown by the program I piped the output of storeBackup into…

The environment variable $DISPLAY was not set so it didn't know on which display to show the tray icon, died and somehow also killed storeBackup.

So I'm happy again!

Thanks for your time anyway and thanks for this great program!

Anonymous
Wed 16 Jan 2013 02:41:31 PM UTC, comment #3: 

Hi Jonas,

I think it's best to post your problem with the script in a "normal" Linux Forum where there are specialists about shell script and cron (I'm mostly using perl, what a surprise ;-) .)

It would be nice if you can post the url of that thread here also so everybody can see the solution.

Thanks and sorry,
Heinz-Josef

Heinz-Josef Claes <hjclaes>
Project Administrator
Tue 15 Jan 2013 09:34:31 PM UTC, comment #2: 

While writing the text below I figured something out:

My script invoked storeBackup this way:

>>>>

{
    echo 'icon /usr/share/icons/gnome/16x16/actions/gtk-save.png'
    /usr/local/bin/storeBackup.pl --file /home/jonas/.storeBackup/storeBackup.conf 2> /home/jonas/.storeBackup/storeBackup.error.log
} | /home/jonas/Programmieren/trayIcon/trayIcon

>>>>


Now I changed it to

>>>>

/usr/local/bin/storeBackup.pl --file /home/jonas/.storeBackup/storeBackup.conf 2> /home/jonas/.storeBackup/storeBackup.error.log

>>>>


And then it works when being called via anacron...

But I would really like to put the output of storeBackup to my little program which displays a tray icon with tooltips during backup.

----- Maybe obsolete text -----

In the beginning I also had problems with the PATH not being set correctly (and perl could not execute some shell program). But I already fixed this.

Anyhow, I'll add the diff of the env output. As you can see $PATH is exactly the same in both versions.

I call storeBackup with

/usr/local/bin/storeBackup.pl --file /home/jonas/.storeBackup/storeBackup.conf 2> /home/jonas/.storeBackup/storeBackup.error.log

Furthermore I added my config file with comments removed.

(file #27278, file #27279)

Anonymous
Tue 15 Jan 2013 02:58:48 PM UTC, comment #1: 

Hi, strange problem :-/ .

The only thing I know about such problems from the past were missing paths in $PATH when called from cron. The beginning of my nightly script look like that (it runs on gentoo):

----------

#! /bin/sh

export PATH=/usr/sbin:/usr/bin:/sbin:/bin

/opt/test/storeBackup/bin/storeBackupUpdateBackup.pl -l /var/log/stbu/storeBackupUpdate.log --progressReport 500 --autorepair --backupDir /disk1/store-backup

equery list "*" > /backup/list_of_packages.gentoo

/opt/test/storeBackup/bin/storeBackup.pl -f /root/bin/storeBackup.config

-----

and so on.
It's normal, that storeBackup doesn't print on STDERR, because errors are logged as ERROR. I have no idea what's the reason for your issue. Can you append your configuration file and the script?

Maybe it helps to compare the output of `env` when run interactively and from cron!?

Regards, Heinz-Josef

Heinz-Josef Claes <hjclaes>
Project Administrator
Mon 14 Jan 2013 11:10:54 PM UTC, original submission:  

Hi,

my storeBackup config + little shell script to invoke it works fine when being called manually. To automate it I set it up to be called by anacron (as my user) every day.

Now the problem is that when the script is called by anacron it runs storeBackup but storeBackup exits more or less immediately. The only output in the log file is:

BEGIN     2013.01.14 23:50:05  7035 backing up directory </home/jonas> to </mnt/2TB/Backup/home_jonas>
VERSION   2013.01.14 23:50:05  7035 storeBackup.pl, 3.3
INFO      2013.01.14 23:50:05  7035 setting ARG_MAX to 63488 (Linux)
INFO      2013.01.14 23:50:05  7035 comprRule = $size > 1024 and not $file =~ /\.zip\Z|\.bz2\Z|\.gz\Z|\.tgz\Z|\.jpg\Z|\.gif\Z|\.tiff?\Z|\.mpeg\Z|\.mpe?g\Z|\.mpe?[34]\Z|\.ogg\Z|\.gpg\Z|\.png\Z|\.lzma\Z|\.xz\Z|\.mov\Z|\.flac\Z|\.mts\Z|\.rar\Z|\.wma\Z/i

It also does not print out anything on stderr which is also caught by my script.

The environment variables $PATH, $USER and $HOME are set to the same values as in an interactive shell (where manually invoking my backup script works like a charm).

I don't have any further ideas as storeBackup does not give me much information.

Thanks for your help
Jonas

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #27278:  anacron-manual.diff added by None (3KiB - text/x-patch)
file #27279:  storeBackup.conf added by None (650B - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by hjclaes (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

     

     

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-01-15 None Attached File- Added anacron-manual.diff, #27278
        Attached File- Added storeBackup.conf, #27279

    Back to the top


    Powered by Savane 3.9