/[BackupPC]/trunk/sql/backups_without_packup_parts.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/backups_without_packup_parts.sql

Parent Directory Parent Directory | Revision Log Revision Log


Revision 290 - (hide annotations)
Wed Jan 25 21:31:20 2006 UTC (18 years, 4 months ago) by dpavlin
File size: 563 byte(s)
find backups without corresponding rows in backup_parts (database consistency check)
1 dpavlin 290 -- find backups without corresponding rows in backup_parts (database consistency check)
2     select hosts.name as host, shares.name as share, backups.num, backups.date::abstime, type, size, inc_size, inc_deleted, parts, dvd_nr
3     from backups
4     join hosts on hostid=hosts.id
5     join shares on shareid=shares.id
6     full outer join archive_backup on archive_backup.backup_id = backups.id
7     full outer join archive on archive.id = archive_backup.archive_id
8     where backups.id not in (select backup_id from backup_parts)
9     and inc_deleted is false
10     and size > 0
11     order by host,share,num
12     ;

  ViewVC Help
Powered by ViewVC 1.1.26