/[BackupPC]/trunk/bin/BackupPC_burnArchiveCLI
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/bin/BackupPC_burnArchiveCLI

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

revision 286 by dpavlin, Sun Jan 15 13:41:23 2006 UTC revision 287 by dpavlin, Sun Jan 15 14:00:14 2006 UTC
# Line 297  foreach my $arc (@archives_to_burn) { Line 297  foreach my $arc (@archives_to_burn) {
297    
298          if ($sth_archive_backup_parts->rows == 0) {          if ($sth_archive_backup_parts->rows == 0) {
299                  warn "ERROR: no backup parts found for $dvd_nr. You should re-create that DVD.\n";                  warn "ERROR: no backup parts found for $dvd_nr. You should re-create that DVD.\n";
300                    print "Do you want to delete invalid DVD #$dvd_nr now? [NO/yes]: ";
301                    my $ok = <STDIN>;
302                    chomp($ok);
303                    if (lc($ok) eq 'yes') {
304                            print "Deleting DVD #$dvd_nr from database...\n";
305    
306                            $dbh->begin_work;
307    
308                            my $sth_delete_dvd = $dbh->prepare( qq{
309                                    delete from archive where dvd_nr = ?
310                            } );
311                            $sth_delete_dvd->execute( $dvd_nr );
312                            $dbh->do( qq{
313                                    select setval('dvd_nr', (select max(dvd_nr) from archive), true)
314                            } );
315    
316                            $dbh->commit;
317                    }
318          }          }
319    
320          my @volumes;          my @volumes;

Legend:
Removed from v.286  
changed lines
  Added in v.287

  ViewVC Help
Powered by ViewVC 1.1.26