Hello List,
BareOS 16.2.4
Problem: I want to purge (and actually delete or truncate) media files
for a single client that is about to be removed. The 'list backups'
command in bconsole says there is only one backup when there should be
more (or did yesterday's purge command succeed anyway despite the fact
that it returned "no jobs found"). There are many Media files for this
client though. How can I purge and then delete those files manually?
In our setup, each client has it's own dedicated storage device, which
is a directory on the filesystem of the backup storage server. In this
case the client is aishare3-fd. So all backups for this client are in
one directory, and no other clients share these media files.
*list backups client=aishare3-fd
+--------+------------------+---------------+---------------------+------+-------+----------+-----------------+-----------+
| JobId | Name | Client | StartTime | Type | Level |
JobFiles | JobBytes | JobStatus |
+--------+------------------+---------------+---------------------+------+-------+----------+-----------------+-----------+
| 18,240 | BackupAishare3 | aishare3-fd | 2018-12-26 21:00:02 | B
| F | 3,366 | 168,733,277,026 | T |
+--------+------------------+---------------+---------------------+------+-------+----------+-----------------+-----------+
Then, directly in SQL:
MariaDB [bareos]> SELECT DISTINCT MediaId FROM JobMedia WHERE JobId = 18240;
+---------+
| MediaId |
+---------+
| 518 |
| 549 |
+---------+
MariaDB [bareos]> SELECT MediaId,MediaType FROM Media WHERE MediaId IN
(518,549);
+---------+----------------------------+
| MediaId | MediaType |
+---------+----------------------------+
| 518 | BackupStore5801 aishare3 |
| 549 | BackupStore5801 aishare3 |
+---------+----------------------------+
So those are related to the one found job. But then:
MariaDB [bareos]> SELECT COUNT(*) FROM Media WHERE MediaType =
'BackupStore5801 aishare3' AND MediaId NOT IN (518,549);
+----------+
| COUNT(*) |
+----------+
| 116 |
+----------+
116 unused media files taking up about 3Tb which I would like to free up...
How to achieve this?
Thanks in advance,
Arjen.
--
You received this message because you are subscribed to the Google Groups
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.