Koozali.org: home of the SME Server
Obsolete Releases => SME 7.x Contribs => Topic started by: hasan on July 03, 2008, 09:05:45 AM
-
Hello All,
I am using a NAS box to backup my server using the contrib affa.
My config file looks like
[root@server ~]# cat nasbox-job.pl
#!/usr/bin/perl -w
# Important: Values must not contain a '|' (pipe) character
# EDIT THIS:
# used as a key for db and as a filename!
# Choose a name with <= 10 chars.
my $jobname='nasbox';
# EDIT THIS:
my %job=(
'remoteHostName'=>'localhost', # FQHN or IP address
'TimeSchedule'=>'1900', # HHMM,HHMM,...
'Description'=>'', # text string.
'scheduledKeep'=>1, # integer >= 1
'dailyKeep'=>7, # integer >= 1
'weeklyKeep'=>4,# integer >= 1
'monthlyKeep'=>12,# integer >= 1
'yearlyKeep'=>2,# integer >= 1
'SMEServer'=>'yes', # yes | no
'Include[0]'=>'', # additional files or directories to include
#'Include[1]'=>'',
#'Include[2]'=>'',
'Exclude[0]'=>'', # files or directories to exclude from backup
#'Exclude[1]'=>'',
#'Exclude[2]'=>'',
'RPMCheck'=>'no', # yes | no
'DiskSpaceWarn'=>'strict', # strict | normal | risky | none
'localNice'=>0, # -19...+19
'remoteNice'=>0, # -19...+19
'Watchdog'=>'yes', # yes | no
'sshPort'=>22, # default ssh port is 22
'ConnectionCheckTimeout'=>120, # seconds
'rsyncTimeout'=>900, # seconds
'rsyncCompress'=>'yes', # yes | no
'EmailAddresses'=>'', # name@domain.com,name@domain.com,...
'chattyOnSuccess'=>0, # send N success notifications
'postJobCommand'=>'', # full path to local program/script
'preJobCommand'=>'', # full path to local program/script
'AutomountDevice'=>'', # Device to auto mount (e.g. USB drive)
'AutomountPoint'=>'', # the mountpoint for AutomountDevice
'AutomountOptions'=>'', # Optionstring passed to mount command e.g. '-t cifs'
'AutoUnmount'=>'no', # umount if fs was not mounted before Affa ran
'RootDir'=>'/var/affa', # where to save the archives. Don't use /root or /home/e-smith
'Debug'=>'no', # yes | no
'status'=>'enabled', # enabled | disabled
'rsync--inplace'=>'yes', # yes | no : rsync on source supports '--inplace' option
'rsync--modify-window'=>0, # integer >= 0, timestamp window
);
### nothing to edit below this line ####
# vi: ft=perl
use strict;
use esmith::DB::db;
if( not $jobname )
{
print "Error: jobname is not set!\n";exit -1;
}
if( not $job{'remoteHostName'} )
{
print "Error: remoteHostName is not set!\n";exit -1;
}
my $affa = esmith::DB::db->open("/home/e-smith/db/affa") or die "Error: Couldn't open /home/e-smith/db/affa db file.";
my $jobconf;
$jobconf = $affa->get($jobname);
if( $jobconf )
{
foreach my $k ('doneDaily','doneWeekly','doneMonthly','doneYearly','chattyOnSuccess') # preserve those
{
$job{$k} = $affa->get_prop($jobname,$k) unless $job{$k};
}
$affa->get($jobname)->delete;
}
$jobconf = $affa->new_record($jobname);
$jobconf->set_prop('type','job');
while( (my $prop,my$val) = each %job )
{
$jobconf->set_prop($prop,$val);
}
system( '/sbin/e-smith/db', '/home/e-smith/db/affa', 'show', $jobname );
system( '/sbin/e-smith/affa', '--make-cronjobs');
exit 0;
And when I do ./nasbox-job.pl i get the following output.
[root@server ~]# ./nasbox-job.pl
nasbox=job
AutoUnmount=no
AutomountDevice=
AutomountOptions=
AutomountPoint=
ConnectionCheckTimeout=120
Debug=no
Description=
DiskSpaceWarn=strict
EmailAddresses=
Exclude[0]=
Include[0]=
RPMCheck=no
RootDir=/var/affa
SMEServer=yes
TimeSchedule=1900
Watchdog=yes
chattyOnSuccess=1000
dailyKeep=7
doneDaily=
doneMonthly=
doneWeekly=
doneYearly=
localNice=0
monthlyKeep=12
postJobCommand=
preJobCommand=
remoteHostName=localhost
remoteNice=0
rsync--inplace=yes
rsync--modify-window=0
rsyncCompress=yes
rsyncTimeout=900
scheduledKeep=1
sshPort=22
status=enabled
weeklyKeep=4
yearlyKeep=2
[root@server ~]#
The NAS Box is having the address 192.168.1.250 and my sme server is 192.168.1.100
I have created a moint point as /mnt/backup on the NAS box which is mounted on /mnt/affanas on my server.
when I see the mount points on my smeserver I get the following:
/dev/mapper/main-root on / type ext3 (rw,usrquota,grpquota)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/md1 on /boot type ext3 (rw)
none on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
192.168.1.250:/mnt/backup on /mnt/affanas type nfs (rw,addr=192.168.1.250)
Now when I am trying trying to run my nasbox or the backup manually after sometime it exits from the pompt and I get the following mail which I can see in the logs too
Excerpt from log file /var/log/affa/nasbox.log:
Thu_Jul__3_11:51:51[START.14964]:_Affa_1.0.0-3:_Running_/sbin/e-smith/affa_--run_nasbox
Job_configuration:
__AutoUnmount=no
__ConnectionCheckTimeout=120
__Debug=no
__DiskSpaceWarn=strict
__EmailAddresses=admin
__RPMCheck=no
__RootDir=/mnt/affanas
__SMEServer=yes
__TimeSchedule=1900
__Watchdog=yes
__chattyOnSuccess=1000
__dailyKeep=7
__doneDaily=-1
__doneMonthly=-1
__doneWeekly=-1
__doneYearly=-1
__monthlyKeep=12
__remoteHostName=localhost
__remoteOS=centos
__rsync--inplace=yes
__rsyncCompress=yes
__rsyncTimeout=900
__rsyncdMode=no
__rsyncdModule=AFFA
__rsyncdPassword=<not_shown>
__rsyncdUser=affa
__scheduledKeep=1
__sendStatus=weekly
__sshPort=22
__status=enabled
__type=job
__weeklyKeep=4
__yearlyKeep=2
Thu_Jul__3_11:51:51[14964]:_Affa_1.0.0-3:_Starting_job_nasbox_scheduled_(localhost)
Thu_Jul__3_11:51:51[14964]:_Description:_
Thu_Jul__3_11:51:51[14964]:_signaling_pre-backup_event_on_localhost
Exec_Out:_exitstatus=1
Thu_Jul__3_11:51:53[14964]:_Error_807:_signaling_pre-backup_event_failed.
It shows Error 807 .
Can anyone explain me what is that. Also the same is happening when the backup starts at the desired time
Thanks and Regards
Hasan
-
Is there no one to answer my queries ...........? :-x
-
hasan
you should log this in the bug tracker against the affa contrib.
go here, you may need to register first
http://bugs.contribs.org/
-
Thanks Brian .... I will file this bug .... and see what happens next :-(
Regards
Hasan