From 05cfd51205c2a7cbaa08f26fea0191f55adb90ed Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Thu, 30 Jul 2009 10:17:38 +0200 Subject: [PATCH] purge basefiles at the same time than files --- bacula/src/dird/ua_purge.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bacula/src/dird/ua_purge.c b/bacula/src/dird/ua_purge.c index ec09f36cdd..f31b577af8 100644 --- a/bacula/src/dird/ua_purge.c +++ b/bacula/src/dird/ua_purge.c @@ -283,6 +283,10 @@ void purge_files_from_jobs(UAContext *ua, char *jobs) db_sql_query(ua->db, query.c_str(), NULL, (void *)NULL); Dmsg1(050, "Delete File sql=%s\n", query.c_str()); + Mmsg(query, "DELETE FROM BaseFiles WHERE JobId IN (%s)", jobs); + db_sql_query(ua->db, query.c_str(), NULL, (void *)NULL); + Dmsg1(050, "Delete BaseFiles sql=%s\n", query.c_str()); + /* * Now mark Job as having files purged. This is necessary to * avoid having too many Jobs to process in future prunings. If -- 2.39.5