import just increments which have files in them
[BackupPC.git] / bin / BackupPC_ASA_BurnArchiveMedia
index 86f20e1..912e00f 100755 (executable)
@@ -15,7 +15,7 @@ use File::Path;
 use Cwd qw/abs_path/;
 use Data::Dumper;
 
-my $debug = $ENV{DEBUG} || 1;
+my $debug = $ENV{DEBUG} || 0;
 # set this to 1 to prompt for DVD removal for each selected item.
 my $prompt_for_delete = shift @ARGV;
 $|=1;
@@ -113,6 +113,7 @@ sub dumpArchive2XML($$$)
        my $backups_sql = q{
                SELECT
                        backup_id,
+                       backup_part_id,
                        host,
                        num,
                        date,
@@ -120,8 +121,7 @@ sub dumpArchive2XML($$$)
                        size
                FROM archive_backup_parts
                WHERE archive_id = ?
-               ORDER BY
-                       hosts.name, shares.name, backups.num
+               ORDER BY backup_part_id
        };
 
        my $sth = $dbh->prepare("SELECT dvd_nr, total_size, note, username, date, id FROM archive WHERE dvd_nr=?");