From 584b370f69032e4f1ea1ab37e83b523044cceeba Mon Sep 17 00:00:00 2001 From: dpavlin Date: Thu, 25 Jan 2007 09:25:23 +0000 Subject: [PATCH] display archives and archvies without backup parts 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 | 11 +++++++++++ sql/xx_display_archive.sql | 13 +++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 sql/xx_backups_without_backup_parts.sql create mode 100644 sql/xx_display_archive.sql diff --git a/sql/xx_backups_without_backup_parts.sql b/sql/xx_backups_without_backup_parts.sql new file mode 100644 index 0000000..15569f0 --- /dev/null +++ b/sql/xx_backups_without_backup_parts.sql @@ -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 index 0000000..7dfb43f --- /dev/null +++ b/sql/xx_display_archive.sql @@ -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 ; + -- 2.20.1