/[rserv]/bin/ApplySnapshot
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/ApplySnapshot

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

revision 1.6 by dpavlin, Sun Nov 2 10:21:45 2003 UTC revision 1.7 by dpavlin, Sun Nov 2 15:43:05 2003 UTC
# Line 19  use Getopt::Long; Line 19  use Getopt::Long;
19  $| = 1;  $| = 1;
20    
21  my ($debug,$verbose) = (0,0);  my ($debug,$verbose) = (0,0);
22  my ($help,$slavehost,$slaveport,$slaveuser,$slavepassword);  my ($help,$slavehost,$slaveport,$slaveuser,$slavepassword,
23            $multiplemaster,
24    );
25  my $snapshot;  my $snapshot;
26    
27  my $result = GetOptions(  my $result = GetOptions(
28          "debug!" => \$debug, "verbose!" => \$verbose, "help" => \$help,          "debug!" => \$debug, "verbose!" => \$verbose, "help" => \$help,
29          "slavehost=s" => \$slavehost, "slaveport=i" => \$slaveport,          "slavehost=s" => \$slavehost, "slaveport=i" => \$slaveport,
30          "slaveuser=s" => \$slaveuser, "slavepassword=s" => \$slavepassword,          "slaveuser=s" => \$slaveuser, "slavepassword=s" => \$slavepassword,
31            "multiplemaster" => \$multiplemaster,
32          "snapshot=s" => \$snapshot,          "snapshot=s" => \$snapshot,
33          );          );
34    
# Line 34  if (defined($help) || (scalar(@ARGV) < 1 Line 37  if (defined($help) || (scalar(@ARGV) < 1
37  Options:  Options:
38          --slavehost=hostname --slaveport=port          --slavehost=hostname --slaveport=port
39          --slaveuser=username --slavepassword=string          --slaveuser=username --slavepassword=string
40            --multiplemaster
41          --snapshot=snapshot          --snapshot=snapshot
42  ";  ";
43      exit ((scalar(@ARGV) < 1)? 1:0);      exit ((scalar(@ARGV) < 1)? 1:0);
# Line 53  if (defined($snapshot)) { Line 57  if (defined($snapshot)) {
57      $inpf = *STDIN;      $inpf = *STDIN;
58  }  }
59    
60  my $res = ApplySnapshot ($conn, $inpf);  my $res = ApplySnapshot ($conn, $inpf, $multiplemaster);
61    
62  if ($res > 0)  if ($res > 0)
63  {  {

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.26