my $connect = "DBI:Pg:dbname=backuppc";
my $commit_every = 100;
+my $limit = 0; # no limit
+#$limit = 1000;
my $bar = Term::ProgressBar->new({
- count => 100,
+ count => 1000,
# fh => \*STDOUT,
# name => 'thingy',
ETA => 'linear',
order by backups.date
};
+$sql .= qq{ limit $limit } if ($limit);
+
_debug("prepare");
my $sth = $dbh->prepare($sql) || die $dbh->errstr();
_debug("execute");
while (my $row = $sth->fetchrow_hashref() ) {
- my $xml = XMLout( $row );
+ my $xml = XMLout( $row, NoAttr => 1, RootName => 'file' );
if ($xml) {
# Set the XmlDocument to the relevant string and then put it
# into the container.
# Commit the writes. This causes the container write operations
# to be saved to the container.
-_debug("commit");
+_debug("final commit");
$txn->commit();