delete Volumes

60 views
Skip to first unread message

Stephan Hermann-Strauß

unread,
Dec 7, 2021, 4:24:36 AM12/7/21
to bareos...@googlegroups.com

Hi there,

 

we just reorganized our volumes/devices/storages/pools design. As a result there are volumes we do not need anymore. What is the safe way to get rid of these volumes and all the backups within?

 

Thanks and greets

Stephan

 

 

Brock Palen

unread,
Dec 7, 2021, 8:51:16 AM12/7/21
to Stephan Hermann-Strauß, bareos...@googlegroups.com
If they are tape volumes you want to recycle, you can just use the purge command.

If they are disk volumes you want to go away bareos won’t delete them,

So I would do

purge volume=<volumename>
delete volume=<volumename>
rm -f /mnt/baroes/<volumename> # update for location of volumes

The purge/delete is important so that baroes don’t think files exist for backup jobs.

If you have a list of volumes in a file you can do:

for x in $(cat /tmp/volumes)
do
echo “purge volume=$x” | bconsole
echo “delete volume=$x” | bconsole
rm -f /mnt/baroes/$x
done


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/0cfe4f9afe164702859b6a19455e16a7%40srvmail2.bruckmatten.rinklin-naturkost.de.

Stephan Hermann-Strauß

unread,
Dec 10, 2021, 10:08:29 AM12/10/21
to Brock Palen, bareos...@googlegroups.com
Hey Brock,

thanks so much - that was very helpful!
I would like to note that the "mass deleting script" needed some little changes to work for me. Here is what worked:

for x in $(cat /your/path/listofvolumefiles.txt)
do
echo purge volume=$x | bconsole
echo delete volume=$x yes | bconsole
rm -f /your/path/$x
done

Many greets
Stephan
IT-Abteilung

Rinklin Naturkost GmbH
Bruckmatten 14-18
79356 Eichstetten am Kaiserstuhl

Telefon +49 7663 9394-448
s.he...@rinklin-naturkost.de
www.rinklin-naturkost.de
---------------------------------------------------------------------------------------------------------
Geschäftsführer: Armin Rinklin, Harald Rinklin, Jochen Rinklin, Wilhelm Rinklin
Registergericht Freiburg HRB 3567 - USt-ID: DE142213751 - DE ÖKO-001

-----Ursprüngliche Nachricht-----
Von: Brock Palen [mailto:bro...@mlds-networks.com]
Gesendet: Dienstag, 7. Dezember 2021 14:51
An: Stephan Hermann-Strauß <S.He...@rinklin-naturkost.de>
Cc: bareos...@googlegroups.com
Betreff: Re: [bareos-users] delete Volumes
Reply all
Reply to author
Forward
0 new messages