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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 238 - (hide annotations)
Thu Nov 17 15:00:26 2005 UTC (18 years, 6 months ago) by dpavlin
File size: 636 byte(s)
show ISO dates and not timestamps

1 dpavlin 103 -- report number of files and staticics for each backup
2    
3     select
4     hosts.name as host,
5     shares.name as share,
6     backupnum as num,
7 dpavlin 238 abstime(backups.date) as backup_date,
8 dpavlin 103 backups.type as type,
9 dpavlin 238 abstime(min(files.date)) as from,
10     abstime(max(files.date)) as to,
11 dpavlin 103 count(*) as files,
12     sum(files.size) as size,
13     sum(backups.size) as backup_size
14     from files
15     join shares on files.shareid=shares.id
16     join hosts on shares.hostid = hosts.id
17     join backups on shares.hostid = backups.hostid
18     and files.backupnum = backups.num
19     and shares.id = backups.shareid
20     group by shares.name, hosts.name, backupnum, backups.date, backups.type
21     order by backups.date;

  ViewVC Help
Powered by ViewVC 1.1.26