pm -> pod
[BackupPC.git] / sql / zz_dst_files_fix.sql
index ac9c140..9965e66 100644 (file)
@@ -1,5 +1,13 @@
+drop index dst_i1 ;
+drop index dst_i2 ;
+drop index dst_i3 ;
+drop table dst_files_ids ;
+drop table dst_files ;
+
+
 select hostid,shareid,num,abstime(date),size,inc_size into dst_files from backups where date > abstime('2005-10-24')::int order by abstime,hostid,num;
 
+delete from archive_backup where backup_id in (select id from backups where date > abstime('2005-10-24')::int) ;
 delete from backups where date > abstime('2005-10-24')::int;
 vacuum analyze backups;