/[BackupPC]/trunk/sql/backup_parts_consistency_report.sql
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /trunk/sql/backup_parts_consistency_report.sql

Parent Directory Parent Directory | Revision Log Revision Log


Revision 308 - (hide annotations)
Sun Jan 29 01:24:37 2006 UTC (18 years, 4 months ago) by dpavlin
File size: 748 byte(s)
check backup_parts against data in backups
1 dpavlin 308 -- 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 backups
15     join shares on shareid = shares.id
16     join hosts on backups.hostid = hosts.id
17     full outer join backup_parts on backups.id = backup_parts.backup_id
18     where backups.size > 0
19     group by
20     hosts.name,
21     shares.name,
22     backups.num,
23     backups.date,
24     backups.type,
25     backups.size,
26     backups.parts,
27     backups.inc_size,
28     backups.inc_deleted
29     having count(backup_parts.backup_id) <> parts
30     order by date asc
31     ;

  ViewVC Help
Powered by ViewVC 1.1.26