r10297@llin: dpavlin | 2006-03-01 14:40:39 +0100
[BackupPC.git] / sql / all_files.sql
1 -- dump all files. Might be VERY VERY slow on large backup pools
2
3 select
4         files.id as unique_id,
5         hosts.name as host,
6         shares.name as share,
7         backupnum as num,
8         backups.date as backup_date,
9         backups.type as type,
10         files.path as path,
11         files.date as date,
12         files.size as size,
13         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 order by backups.date;