The FreeBSD Diary

The FreeBSD Diary (TM) Remember
I remember
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]

Scripts / handy tips
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Previous Message  |  Next Message 
 Finding 'duplicate' Bacula volume names
Author: Dan 
Date:   27-02-12 02:31

I had a bunch of tapes that I had labelled manually. Later, I got a tape library, which could read tape labels. Thus, I wanted to relabel the tapes, but had to delete the old volumes from the Bacula database. First, I needed to know what tapes where relabeled. This query told me that.

Fortunately, the labels I used manually were based on the bar code label.

SELECT media.volumename as NEW, M.volumename as OLD
FROM media, (SELECT volumename, substr(volumename, 9) || 'S2' AS newmedianame
FROM media M
WHERE volumename LIKE 'DLT7000-JYN%') AS M
WHERE media.volumename = m.newmedianame
order by 2

--
Webmaster

 Reply To This Message  |  Forum List  |  Flat View   Newer Topic  |  Older Topic 

 Topics Author  Date
 Finding 'duplicate' Bacula volume names   new
Dan 27-02-12 02:31 


 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Password:
 Remember my login:
   
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum

phorum.org