git-svn-id: svn+ssh://llin/home/dpavlin/private/svn/BackupPC/trunk@75
8392b6e1-25fa-0310-8288-
cc32f8e212ea
--- /dev/null
+-- report number of files in each backup
+
+select
+ shares.name,
+ hosts.name,
+ backupnum,
+ count(*)
+from files
+join shares on shareid=shares.id
+join hosts on hostid = hosts.id
+group by shares.name, hosts.name, backupnum
+order by hosts.name, shares.name, backupnum;
--- /dev/null
+-- fix database to repair found_in_db bug fixed in r74
+
+delete from files where id not in (
+ select distinct on(shareid,path,date,size) id
+ from files
+ order by shareid,path,date,size,backupnum asc
+);