Hi Craig,

I am still having problem. :(  Pls see below for the result I got.

Best regards,
Bill


On 11/27/06, Craig Smith <[EMAIL PROTECTED]> wrote:

Hi bill,

Will try and find the rsync errors I saw when I was testing all of this.
The part of the script you commented out controls the size of the logfile,
but since 20Mb is rather large it takes time to run, so it can mange
without
it. Your script runs fine on my system.

However I suspect the problem lies in the size variable.  the ls listing
in
centos is probably different to fedora.  Run the below command and see
which
field it is displaying.  Is should be the size portion, but it may not be.
Increment or decrese the 5 until you get the correct result, and edit your
script accordingly.  However you can manage without that if you want to
manually rotate your logs.

ls -l  $LOG|cut -d ' ' -f 5


I have to adjust to -f 6 in order to get the file size.  :)


As for the rsync errors, the errors relating to MY.DOMAIN are normal if
your
mail is being deleted from the server as people check.  It will be down to
the script running after a file was there, and during the run was deleted.

What happens if you run /unison/unison -force / -batch qmail and then run
it
again straight after it completes, are the errors identical or do they
differ or go away?


The error is same as before.




It may be that you need to reset the unison database.  To do that on both
servers do the following.

cd /root/.unison.

If you do ll you will see something similar to
arb35cf206e53266f6ceb48d38f9f6c049.  That is the database, if you delete
or
rename those on both servers and then run the command it will repopulate
the
data it is working with.  Try that and let me know.


I rename the name of databases and then run qmail-replicatec again.  But I
get the same error:

Synchronization incomplete  (1 item transferred, 0 skipped, 2 failures)
 failed: home/vpopmail/.spamassassin
 failed: home/vpopmail/domains/MY.DOMAIN.COM
Deleting lock file

Since it can transfer 1 file, can I assume unison should be working?



P.S.  If you do sort out the size variable on your system could you leave
a
comment on the wiki, or let me know the details so I can leave a note for
other centos users.  Also did you notice I took the backup server side
script out of cron, as it isn't really necessary and should be run
manually
in the case of a switch over.  However I would recommend, that you test
your
backup server on a regular basis to make sure it is working and you can
logon. Run the qmail-replicateb script and then verify.

I normally activate the backup server, and change my account to point to
it,
and make sure I can authenticate.  I also do /home/vpopmail/bin/vuserinfo
randomn users and confirm their details.

Hope that helps.  Let me know what unison says after a clearout.

Craig





________________________________

From: Bill Kwok [mailto:[EMAIL PROTECTED]
Sent: 27 November 2006 10:41
To: [email protected]
Subject: Re: [qmailtoaster] Problem in using "Failover replication Setup"


Craig,

After commenting out 68-72 lines, the script no longer shows error
message,
but the same error still exists in unionlog.full file:

Synchronization incomplete  (9 items transferred, 0 skipped, 2 failures)
failed: home/vpopmail/.spamassassin
failed: home/vpopmail/domains/MY.DOMAIN.COM
Deleting lock file


Pls find the attached qmail-replicatec.  Thanks.

Best regards,
Bill


On 11/27/06, Craig Smith <[EMAIL PROTECTED]> wrote:

       Hi Bill,

       It's no problem, I hope I can help get it sorted and that it works
as well for you as it does for me.  Does the error you get still reflect
the
same line now that you've recopied the script?
       the unison run seems to be running.  I see 2 failures and I can't
remember at this point what they indicate, but I have seen them before.

       If the script error is still on the same line, can you comment out
the section you pasted and let me know what it says then.  So add # in
front
of each line from 61 to 65.

       It is probably something that centos expects that fedora doesn't.
I've not worked with centos before.  Jake or Eric, do you guys know if
Centos handles shell script slightly differently?

       Also bill could you attach the script from your server, so I can
run
your exact script on my server and see what happens?

       Thanks

       Craig


________________________________

       From: Bill Kwok [mailto:[EMAIL PROTECTED]
       Sent: 25 November 2006 07:07
       To: [email protected]
       Subject: Re: [qmailtoaster] Problem in using "Failover replication
Setup"


               Hi Craig,

       Thanks a lot for helping me fix this problem.  I got the error
again
even though after I've copied the souce code from website again.  Here's
my
lines 61-65 (or 68-73 in the new script):

       if [ $size -gt 20000000 ];then
       echo "this is bigger than 20MB, moving">>$LOG
       mv $LOG $LOGSAVE
       echo "" >$LOG
       fi

       If I run the command  '/unison/unison -force / -batch qmail', I got
the following output:

       .
       .
       .
       local        : unchanged file     modified on 2006-11-23 at
12:28:56
size 1689      rw-r--r--
       BACKUP.h... : changed file       modified on 2006-11-24 at 19:06:23
size 1689      rw-r--r--
       Propagating updates


       UNISON started propagating changes at 14:40:39 on 25 Nov 2006
       [BGN] Updating file var/qmail/control/dh1024.pem
         from /
         to //BACKUP.MY.DOMAIN.COM//
       [BGN] Updating file var/qmail/control/dh512.pem
         from /
         to //BACKUP.MY.DOMAIN.COM//
       [BGN] Updating file var/qmail/control/rsa512.pem
         from /
         to //BACKUP.MY.DOMAIN.COM//
       [BGN] Copying home/vpopmail/.spamassassin
         from /
         to //BACKUP.MY.DOMAIN.COM//
       [BGN] Copying properties for home/vpopmail/domains
         from /
         to //BACKUP.MY.DOMAIN.COM//
       [BGN] Copying home/vpopmail/domains/.overquota.msg
         from /
         to //BACKUP.MY.DOMAIN.COM//
       [BGN] Copying home/vpopmail/domains/.quotawarn.msg
         from /
         to //BACKUP.MY.DOMAIN.COM//
       [BGN] Copying home/vpopmail/domains/MY.DOMAIN.COM
         from /
         to //BACKUP.MY.DOMAIN.COM//
       [BGN] Updating file unison/mysql.dump/vpopmail
         from /
         to //BACKUP.MY.DOMAIN.COM//
       [BGN] Updating file var/qmail/control/badloadertypes
         from /
         to //BACKUP.MY.DOMAIN.COM//
       [BGN] Updating file var/qmail/control/badloadertypes.cdb
         from /
         to //BACKUP.MY.DOMAIN.COM//
       [BGN] Updating file var/qmail/control/servercert.pem.rpmnew
         from /
         to //BACKUP.MY.DOMAIN.COM//
       [END] Copying properties for home/vpopmail/domains
       [END] Updating file var/qmail/control/dh1024.pem
       [END] Updating file var/qmail/control/dh512.pem
       [END] Updating file var/qmail/control/rsa512.pem
       [END] Copying home/vpopmail/domains/.overquota.msg
       [END] Copying home/vpopmail/domains/.quotawarn.msg
       [END] Updating file unison/mysql.dump/vpopmail
       [END] Updating file var/qmail/control/badloadertypes
       [END] Updating file var/qmail/control/badloadertypes.cdb
       [END] Updating file var/qmail/control/servercert.pem.rpmnew
       Failed: Aborted
        15%  07:54 ETAFailed [home/vpopmail/.spamassassin]: Aborted
       Failed: Error in rsync sender:


/home/vpopmail/domains/MY.DOMAIN.COM/userA/Maildir/cur/1164431645.26630.mx.M
Y.DOMAIN.COM,S=4733:2,: No such file or directory
        15%  07:54 ETAFailed [home/vpopmail/domains/MY.DOMAIN.COM]: Error
in rsync sender:


/home/vpopmail/domains/MY.DOMAIN.COM/userA/Maildir/cur/1164431645.26630.mx.M
Y.DOMAIN.COM,S=4733:2,: No such file or directory
       UNISON finished propagating changes at 14:42:10 on 25 Nov 2006


       Saving synchronizer state
       Synchronization incomplete  (10 items transferred, 0 skipped, 2
failures)
         failed: home/vpopmail/.spamassassin
         failed: home/vpopmail/domains/MY.DOMAIN.COM


               Thanks again for your help and sorry to bother you while
you
are busy.

       Best regards,
       Bill



       On 11/25/06, Craig Smith <[EMAIL PROTECTED]> wrote:

               As a follow up, I did a direct copy of the text from the
wiki into a test file, I ran sh testfile and it ran fine.  Assuming that
the
unison application and the qmail.prf file is in place, it should run fine.

               Try running the unison command manually and let me know
what
happens.

               /unison/unison -force / -batch qmail

               Did you skip anything in the process or run into problems
during it?  It may be something that centos doesn't like that fedora
doesn't
care about, but I can't say as I've never used centos.

               Try recopying, the script and let me know what happens.

               Craig

________________________________

               From: Craig Smith [mailto:[EMAIL PROTECTED]
               Sent: 24 November 2006 16:15
               To: [email protected]
               Subject: RE: [qmailtoaster] Problem in using "Failover
replication Setup"


                               Hi Ben,

               If you vi qmail-replicatec and do :61 what do you get?  It
may just be something that copied from the site.  In terms of setup, on
the
backup server you don't need to create anything, just have QMT installed
and
working.  The replication script will replicate all folders, users,
control
files and mysql data to populate the backup folder.  The fact that you are
getting an error in the script means there is something wrong on line 61.

               On my line 61 there is an open line with nothing.

               I will copy the one from the wiki and run it to see what I
get.

               As for the file, it fails during transfer which is why it
is
blank.

               Let me see what happens if I copy and paste directly from
the wiki.

               Also I've just made a minor change to the qmail-replicatec
file by adding a lock file process, as mine went a bit nuts last night.
Also I've removed the qmail-replicateb from cron as this only really needs
to be run if you switch to the backup.

               Sorry for the slow reply been mad busy.

               Regards

               Craig



________________________________

               From: Bill Kwok [mailto:[EMAIL PROTECTED]
               Sent: 23 November 2006 09:30
               To: qmailtoaster-list
               Subject: [qmailtoaster] Problem in using "Failover
replication Setup"


               Hi all,

               I am trying to setup a setup for failover.  Both machines
are running CentOS 4.2.  I've just installed qt to my backup server, but
no
domains and users were setup.

               I am having problem in synchronizing them.  When I run the
qmail-replicatec, I got the following error:


                       [EMAIL PROTECTED] unison]# ./qmail-replicatec
                       ./qmail-replicatec: line 61: [: root: integer
expression expected


               In the unisonlog.full, some error message such as the
following are logged:


                       Failed: The file
/home/vpopmail/.spamassassin/auto-whitelist
                       has been modified during synchronization: transfer
aborted
                         2%  04:06 ETAFailed
[home/vpopmail/.spamassassin]:
The file /home/vpopmail/.spamassassin/auto-whitelist
                       has been modified during synchronization: transfer
aborted
                       Failed: The file
/home/vpopmail/domains/my.domain.com/alison.lam/Maildir/maildirsize
                       has been modified during synchronization: transfer
aborted
                         2%  04:06 ETAFailed [home/vpopmail/domains]: The
file /home/vpopmail/domains/my.domain.com/userA/Maildir/maildirsize
                       has been modified during synchronization: transfer
aborted
                       UNISON finished propagating changes at 17:04:14 on
23 Nov 2006


                       Saving synchronizer state
                       Synchronization incomplete  (1 item transferred, 0
skipped, 2 failures)
                         failed: home/vpopmail/.spamassassin
                         failed: home/vpopmail/domains

               Then I found that there's no file copied to
/home/vpopmail/domains.

               Am I in a wrong sequence of installation?  Do I need to
create all domains and users in backup server before synchronizating them?

               Thanks in advance.

               Best regards,
               Bill





---------------------------------------------------------------------
    QmailToaster hosted by: VR Hosted <http://www.vr.org>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to