Freeing up Diskspace used by Volumes with Recycle Status

28 views
Skip to first unread message

Steve O'Brien

unread,
Nov 16, 2023, 3:50:09 PM11/16/23
to bareos-users
I have looked at several discussions and the manual about why my disk is almost full with volumes that are in the recycle state, however I still do not know  how to free up this disk space?
TIA,
Steve

Miguel Santos

unread,
Nov 17, 2023, 5:01:25 AM11/17/23
to bareos-users
Hi,

They are not going to be free up until BAREOS requires to write them again, this is by design. BAREOS will only delete data when it is needed.

If your volumes are in Full or Used state and the expiration has been reached, then BAREOS may use the volume and recycle it.

Alternatively, if you want to have a bit more control take a look at this project, maybe there are some scripts that may be useful to what you are trying to accomplish: https://github.com/eayin2/bacula_scripts

Brock Palen

unread,
Nov 17, 2023, 9:41:14 AM11/17/23
to Miguel Santos, bareos-users
You can speed it up a little I use a script that uses the truncate command. It’s imperfect but I call this as part of a migrate job that moves from disk volumes to tape volumes (there are bugs related to that but that’s another issue).

#!/bin/bash
#POOL=AI-Incremental
#POOL=AI-Consolidated
POOL=$1
for x in `echo "list volumes pool=${POOL}" | bconsole | grep -v "list volumes" | grep $POOL | awk -F\| '{print $3}'`
do
echo "prune volume=$x yes"
done | bconsole

# actaully free up disk space
echo "truncate volstatus=Purged pool=$POOL yes" \
| bconsole


Brock Palen
bro...@mlds-networks.com
www.mlds-networks.com
Websites, Linux, Hosting, Joomla, Consulting
> --
> 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 bareos-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/bareos-users/600d8bae-a647-4436-85cc-409bcbda11fen%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages