X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=bin%2FBackupPC_updatedb;h=9315026e413c7738e9b79216a7769ee711dce0fb;hp=d28096ce40fa32b4868537eb3816594d0980ed20;hb=d44122e00f7b7b95696a872c23b985b82ebb34bb;hpb=ee499dda4d49dfa4d0b51e158c35a565178efde8 diff --git a/bin/BackupPC_updatedb b/bin/BackupPC_updatedb index d28096c..9315026 100755 --- a/bin/BackupPC_updatedb +++ b/bin/BackupPC_updatedb @@ -351,6 +351,28 @@ if ($opt{c}) { date timestamp default now(), primary key(id) ); + + -- report backups and corresponding dvd + + create view backups_on_dvds as + select + backups.id as id, + hosts.name || ':' || shares.name as share, + backups.num as num, + backups.type as type, + abstime(backups.date) as backup_date, + backups.size as size, + backups.inc_size as gzip_size, + archive.id as archive_id, + archive.dvd_nr + from backups + join shares on backups.shareid=shares.id + join hosts on shares.hostid = hosts.id + left outer join archive_backup on backups.id = archive_backup.backup_id + left outer join archive on archive_backup.archive_id = archive.id + where backups.parts > 0 and size > 0 + order by backups.date + ; }); print "creating indexes: ";