Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 04-08-2005, 10:40 AM   #1
LQ Newbie
Registered: Aug 2003
Posts: 2

Rep: Reputation: 0
Perl issue - Snapback2

Hello folks,

I have an issue with a perl script we are using for backup on our server. The script is called Snapback2 and is using rsync snapshots to backup files and it includes a full rotation system. Now it's all configured and working but the script generates an error every time it's run.

Error: "Hourly backup must be greater than or equal to 1."

Now the code that this generates this is:

my $hr_backup = $self->config(-Hourlies);

	if($hr_backup < 1) {
		$self->log_error("Hourly backup must be greater than or equal to 1.");
The config file: snapback.conf in /etc/snapback hosts the vaule: Hourlies 4

So what I cannot understand is why the if statement returns true since it's value should be 4. My guess is either the the config() is not working as it should or there might be some incompability? Any input is very appriciated!

The program is located here:
Old 04-10-2005, 06:59 AM   #2
Registered: Aug 2004
Location: Australia
Distribution: Fedora
Posts: 282

Rep: Reputation: 30
my $hr_backup = $self->config(-Hourlies);
Wild guess:
Could it be $self->config{"Hourlies"}; ?

(assuming config is a dictionary and you need to use a string as a key...)

Besides, the best way to debug the problem is, when this class read the config file, try to print out the line and the internal variables which hold these config values in order to see if the config file is properly read and interpreted.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
perl with BerkeleyDB issue? Xstack Programming 0 06-03-2005 08:09 PM
eximstats failed...perl issue I_AM Linux - General 1 05-28-2005 05:51 PM
mysql 4.1.7 mysqlhotcopy perl issue dtra Linux - Software 1 05-10-2005 10:11 AM
perl issue moonloader Slackware 2 03-27-2004 02:07 PM
Perl Script issue.... oicdn Linux - Software 2 03-24-2004 11:47 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:26 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration