LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 04-08-2005, 09:40 AM   #1
kantzow
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:

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

	if($hr_backup < 1) {
		$self->log_error("Hourly backup must be greater than or equal to 1.");
		return;
	}
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: perusion.com/misc/Snapback2
 
Old 04-10-2005, 05:59 AM   #2
ahwkong
Member
 
Registered: Aug 2004
Location: Australia
Distribution: Fedora
Posts: 282

Rep: Reputation: 30
Code:
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.
 
  


Reply


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 07:09 PM
eximstats failed...perl issue I_AM Linux - General 1 05-28-2005 04:51 PM
mysql 4.1.7 mysqlhotcopy perl issue dtra Linux - Software 1 05-10-2005 09:11 AM
perl issue moonloader Slackware 2 03-27-2004 01:07 PM
Perl Script issue.... oicdn Linux - Software 2 03-24-2004 10:47 AM


All times are GMT -5. The time now is 02:04 PM.

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