/[BackupPC]/trunk/dbxml/convert_pgsql_xmldb.pl
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 /trunk/dbxml/convert_pgsql_xmldb.pl

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

revision 223 by dpavlin, Sat Oct 22 15:40:42 2005 UTC revision 224 by dpavlin, Sat Oct 22 15:40:46 2005 UTC
# Line 19  my $xmldb_container = 'backuppc.dbxml'; Line 19  my $xmldb_container = 'backuppc.dbxml';
19  my $connect = "DBI:Pg:dbname=backuppc";  my $connect = "DBI:Pg:dbname=backuppc";
20    
21  my $commit_every = 100;  my $commit_every = 100;
22    my $limit = 0;  # no limit
23    #$limit = 1000;
24    
25  my $bar = Term::ProgressBar->new({  my $bar = Term::ProgressBar->new({
26          count => 100,          count => 1000,
27  #       fh    => \*STDOUT,  #       fh    => \*STDOUT,
28  #       name  => 'thingy',  #       name  => 'thingy',
29          ETA     => 'linear',          ETA     => 'linear',
# Line 82  join backups on shares.hostid = backups. Line 84  join backups on shares.hostid = backups.
84          and files.backupnum = backups.num          and files.backupnum = backups.num
85          and shares.id = backups.shareid          and shares.id = backups.shareid
86  order by backups.date  order by backups.date
 limit 1000  
87  };  };
88    
89    $sql .= qq{ limit $limit } if ($limit);
90    
91  _debug("prepare");  _debug("prepare");
92  my $sth = $dbh->prepare($sql) || die $dbh->errstr();  my $sth = $dbh->prepare($sql) || die $dbh->errstr();
93  _debug("execute");  _debug("execute");

Legend:
Removed from v.223  
changed lines
  Added in v.224

  ViewVC Help
Powered by ViewVC 1.1.26