/[rserv]/bin/Replicate
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /bin/Replicate

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.11 by dpavlin, Wed Oct 29 18:00:18 2003 UTC revision 1.12 by dpavlin, Thu Oct 30 19:59:48 2003 UTC
# Line 15  use strict; Line 15  use strict;
15  use IO::File;  use IO::File;
16  use Getopt::Long;  use Getopt::Long;
17  use RServ;  use RServ;
 use Sys::Hostname;  
18    
19  $| = 1;  $| = 1;
20    
# Line 124  if ($sconn->status != Pg::PGRES_CONNECTI Line 123  if ($sconn->status != Pg::PGRES_CONNECTI
123      exit 1;      exit 1;
124  }  }
125    
126  $slavehost = hostname if (! $slavehost);  $slavehost = 'localhost' if (! $slavehost);
127  my $slaveId = GetSlaveId($mconn, $slave, $slavehost);  my $slaveId = GetSlaveId($mconn, $slave, $slavehost);
128    
129  die "\n>>>>>>>>>>>>> ERROR: Can't GetSlaveID for $sinfo\n" if (! $slaveId);  die "\n>>>>>>>>>>>>> ERROR: Can't GetSlaveID for $sinfo\n" if (! $slaveId);
# Line 138  SyncSync($mconn, $sconn); Line 137  SyncSync($mconn, $sconn);
137  my $outf = new IO::File;  my $outf = new IO::File;
138  open $outf, ">$snapshot";  open $outf, ">$snapshot";
139  print "\n>>>>>>>>>>>>> Prepare Snapshot\n\n" if ($verbose);  print "\n>>>>>>>>>>>>> Prepare Snapshot\n\n" if ($verbose);
140    print "master id: $mserver slave id: $slaveId\n" if ($debug);
141  my $res = PrepareSnapshot($mconn, $sconn, $outf, $mserver, $slaveId, $tables);  my $res = PrepareSnapshot($mconn, $sconn, $outf, $mserver, $slaveId, $tables);
142  close $outf;  close $outf;
143  if ($res < 0) {  if ($res < 0) {

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

  ViewVC Help
Powered by ViewVC 1.1.26