From a3852c50c12ecbe7f130eb99d864745c18b6f7e7 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Fri, 21 Apr 2017 09:25:20 +0200 Subject: [PATCH] Do not purge/recycle volumes marked as Recycle=no --- bacula/src/cats/sql_find.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bacula/src/cats/sql_find.c b/bacula/src/cats/sql_find.c index ae7aeb5039..a94e2d2215 100644 --- a/bacula/src/cats/sql_find.c +++ b/bacula/src/cats/sql_find.c @@ -388,7 +388,7 @@ int BDB::bdb_find_next_volume(JCR *jcr, int item, bool InChanger, MEDIA_DBR *mr) "Enabled,LocationId,RecycleCount,InitialWrite," "ScratchPoolId,RecyclePoolId,VolReadTime,VolWriteTime,ActionOnPurge,CacheRetention " "FROM Media WHERE PoolId=%s AND MediaType='%s' " - " AND (VolStatus = 'Append' OR (VolStatus IN ('Recycle', 'Purged', 'Used', 'Full') AND Recycle=1)) " + " AND (VolStatus IN ('Full', 'Append', 'Used') OR (VolStatus IN ('Recycle', 'Purged', 'Used') AND Recycle=1)) " " AND Enabled=1 " "ORDER BY LastWritten LIMIT 1", edit_int64(mr->PoolId, ed1), esc_type); -- 2.39.2