1 |
-- check consistency of data for one DVD image. This is more detailed than |
2 |
-- error message from BackupPC_Bur |
3 |
select |
4 |
hosts.name || '_' || |
5 |
shares.name || '_' || |
6 |
backups.num as increment_name, |
7 |
backups.date::abstime, |
8 |
backups.type, |
9 |
backups.size, |
10 |
backups.parts, |
11 |
count(backup_parts.backup_id) as backup_parts, |
12 |
backups.inc_size, |
13 |
backups.inc_deleted |
14 |
from archive_backup |
15 |
join archive on archive_id = archive.id |
16 |
join backups on backup_id = backups.id |
17 |
join shares on shareid = shares.id |
18 |
join hosts on backups.hostid = hosts.id |
19 |
full outer join backup_parts on backups.id = backup_parts.backup_id |
20 |
-- where dvd_nr = 14 |
21 |
group by |
22 |
hosts.name, |
23 |
shares.name, |
24 |
backups.num, |
25 |
backups.date, |
26 |
backups.type, |
27 |
backups.size, |
28 |
backups.parts, |
29 |
backups.inc_size, |
30 |
backups.inc_deleted |
31 |
having count(backup_parts.backup_id) <> parts |
32 |
order by inc_size desc |
33 |
; |