display archives and archvies without backup parts
authordpavlin <dpavlin@8392b6e1-25fa-0310-8288-cc32f8e212ea>
Thu, 25 Jan 2007 09:25:23 +0000 (09:25 +0000)
committerdpavlin <dpavlin@8392b6e1-25fa-0310-8288-cc32f8e212ea>
Thu, 25 Jan 2007 09:25:23 +0000 (09:25 +0000)
git-svn-id: svn+ssh://llin/home/dpavlin/private/svn/BackupPC/trunk@366 8392b6e1-25fa-0310-8288-cc32f8e212ea

sql/xx_backups_without_backup_parts.sql [new file with mode: 0644]
sql/xx_display_archive.sql [new file with mode: 0644]

diff --git a/sql/xx_backups_without_backup_parts.sql b/sql/xx_backups_without_backup_parts.sql
new file mode 100644 (file)
index 0000000..15569f0
--- /dev/null
@@ -0,0 +1,11 @@
+select
+       hosts.name,
+       shares.name,
+       backups.num,
+       date::abstime
+from backups
+       join hosts on hosts.id = hostid
+       join shares on shares.id = shareid
+where backups.id not in (select backup_id from backup_parts) and inc_size != -1
+order by hosts.name, shares.name ;
+
diff --git a/sql/xx_display_archive.sql b/sql/xx_display_archive.sql
new file mode 100644 (file)
index 0000000..7dfb43f
--- /dev/null
@@ -0,0 +1,13 @@
+select
+       hosts.name as host,
+       shares.name,
+       backups.num as share,
+       inc_size,
+       inc_deleted,
+       parts
+from archive_backup
+       join backups on backups.id = backup_id
+       join shares on shares.id = shareid
+       join hosts on hosts.id = shares.hostid
+where archive_id = 21 order by hosts.name, shares.name, backups.num ;
+