NBU cannot control the barcode. This is controlled by the library.
The barcode is physical, what is on the tape. This is read by the library and passed to netbackup. NBU does NOT read the barcode, the library tells NBU what the barcode is.
Some libraries allow you to mask the barcode, and only display xx characters, this is nothing to do with NBU.
If you run robtest and do s s, you will see the barcodes, and whatever they are, is what is sent from the library.
It you set the library to display all 8 charaters, you will have something like this;
AA1234L4
You then use the media generation rule to set what NBU will use as the media ID.
EG For robot 0
MEDIA_ID_BARCODE_CHARS 0 8 1:2:3:4:5:6
This would give a media id of AA1234 This is generally what people use.
If you did
MEDIA_ID_BARCODE_CHARS 0 8 3:4:5:6
You would get 1234 as the media id.
Back to your example.
01450000
To make the barcode display as 0145 you would have to set the library to only display the first x4 characters from the left. It is possible your library does not have this feature.
It is possible to change the barcode with a command but you would have to do this for each tape - I DO NOT recommend this.
In fact, I do not recommend
1. Chaging to only 4 characters, why, leave it at 6 or 8 , it is not doing any harm.
2. If you already have media I would not start changing barcodes, you WILL run into all sorts of issues later on
3. If you are setting up a new environment from scratch, and there ar eno media yet, that is the time to change things.
Most perople use media ID of first 6 characters, and the barcode is either the same, or all 8.
I see no reason to limit it to 4, I have never seen this done, and the fact that no one is doing it should tell you something.
martin