list all backups with dvd number (if burned)
authordpavlin <dpavlin@8392b6e1-25fa-0310-8288-cc32f8e212ea>
Tue, 26 Sep 2006 14:14:14 +0000 (14:14 +0000)
committerdpavlin <dpavlin@8392b6e1-25fa-0310-8288-cc32f8e212ea>
Tue, 26 Sep 2006 14:14:14 +0000 (14:14 +0000)
git-svn-id: svn+ssh://llin/home/dpavlin/private/svn/BackupPC/trunk@364 8392b6e1-25fa-0310-8288-cc32f8e212ea

sql/backups_on_dvds.sql [new file with mode: 0644]

diff --git a/sql/backups_on_dvds.sql b/sql/backups_on_dvds.sql
new file mode 100644 (file)
index 0000000..acab92b
--- /dev/null
@@ -0,0 +1,20 @@
+-- report backups and corresponding dvd
+
+select
+       backups.id as id,
+       hosts.name || ':' || shares.name as share,
+       backups.num as num,
+       backups.type as type,
+       abstime(backups.date) as backup_date,
+       backups.size as size,
+       backups.inc_size as gzip_size,
+       archive.id as archive_id,
+       archive.dvd_nr
+from backups
+join shares on backups.shareid=shares.id
+join hosts on shares.hostid = hosts.id
+left outer join archive_backup on backups.id = archive_backup.backup_id
+left outer join archive on archive_backup.archive_id = archive.id
+where backups.parts > 0 and size > 0
+order by backups.date
+;