Hi List,

I want to remove all storage files on the backup storage when I remove a client to free up disk space. Some clients have +3TB of backups. I use bareos 16.2.

Given that:

 * we backup on-disk, no tapes
 * each client has his own, dedicated directory on the storage device
   containing only Full, Incr and Diff files belonging to that client
 * We have the the MediaType field of the Media table is always made up
   out of "storagedevicename client_name"

Can I:

1. SELECT * FROM Media WHERE MediaType = 'storagedevicename client_name';
2. foreach returned row:
   SELECT 1 FROM JobMedia WHERE MediaId = $mediaId_from_row LIMIT 1
3. if nr_of_rows == 0
   UPDATE Media SET VolStatus = 'Purged' WHERE MediaId = $mediaId_from_row;
4. Delete corresponding physical file from the storage.


causing my storage device to give me back some disk space ?


I could not find a way to do this from the console, at least not with the bareos version I am using.

Thanks in advance,

Arjen Van Drie.


--
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.

Reply via email to