From: Eric Bollengier Date: Fri, 21 Apr 2017 07:25:20 +0000 (+0200) Subject: Do not purge/recycle volumes marked as Recycle=no X-Git-Tag: Release-7.9.0~43 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a3852c50c12ecbe7f130eb99d864745c18b6f7e7;p=bacula%2Fbacula Do not purge/recycle volumes marked as Recycle=no --- 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);