05-27-2016 06:35 AM
Hi,
We used to backup to tape on one site using media server dwb004, which has now been replaced by a different server. I tried to restore a tape that was written by dwb004 earlier today using a tape library controlled by media server BC11N1V1. The original source server was ukdcsitdb03 and the target was uwb008, but the backup failed:
27/05/2016 14:03:01 - begin Restore
27/05/2016 14:03:02 - 1 images required
27/05/2016 14:03:02 - media MB2090 required
27/05/2016 14:03:04 - restoring image ukdcsitdb03_1441717428
27/05/2016 14:03:06 - Error bpbrm(pid=3660) bpcd on uwb008 exited with status 59: access to the client was not allowed
27/05/2016 14:03:07 - Info bpbrm(pid=3660) telling media manager to start restore on client
27/05/2016 14:03:08 - Warning bptm(pid=23048) failure logging message to client uwb008 in log /C/Programà€ Files/Veritas/NetBackup/logs/user_ops/cgiadmin/logs/NBWIN005: server not allowed access (46)
27/05/2016 14:03:08 - requesting resource MB2090
27/05/2016 14:03:09 - Error bpbrm(pid=11128) bpcd on uwb008 exited with status 59: access to the client was not allowed
27/05/2016 14:03:09 - connecting
27/05/2016 14:03:09 - awaiting resource MB2090 Reason: Tape media server is not active, Media Server: dwb004,
Robot Number: 1, Robot Type: TLD, Media ID: N/A, Drive Name: N/A,
Volume Pool: N/A, Storage Unit: N/A, Drive Scan Host: N/A
27/05/2016 14:03:10 - Error bpbrm(pid=11128) bpcd on uwb008 exited with status 59: access to the client was not allowed
27/05/2016 14:03:10 - Info bpbrm(pid=3660) child done, status 59
27/05/2016 14:03:10 - Info bpbrm(pid=3660) sending message to media manager: STOP RESTORE ukdcsitdb03_1441717428
27/05/2016 14:04:08 - Info bpbrm(pid=3660) media manager for backup id ukdcsitdb03_1441717428 exited with status 150: termination requested by administrator
27/05/2016 14:04:08 - restored image ukdcsitdb03.dcsit.net_1441717428 - (access to the client was not allowed(59)); restore time 00:01:04
27/05/2016 14:04:10 - Warning bprd(pid=10832) Restore must be resumed prior to first image expiration on 05/09/2025 14:03:48
27/05/2016 14:04:12 - end Restore; elapsed time: 00:01:11
Restore error(2850)
It seemed that the backup was trying to run using dwb004 but it is no longer an active tape media server. The "access to the client not allowed (59)" possibly came about because dwb004 is not in the servers list of the client uwb008. But that's a side issue.
I went into the robot currently holding the tapes for this and in the gui changed their owner from "dwb004" (the old defunct tape media server) to "bc11n1v1" (the media server controlling the library now hosting the tapes). But this made no difference - same error. I then googled a bit and created an entry in Master -> General Server -> Media Host Override, setting dwb004 as the original server and bc11n1v1 as the restore server, and the restore is now running. Obviously this forces all tapes originally written by dwb004 to be restored by bc11n1v1.
Question is, why didn't changing the media owner work? I don't want to leave that media host override setting in place because sometimes we might want to use our other tape media server on our other site to restore from. It seems like a clumsy fix. Surely if I change the media owner that should have fixed the problem? (I didn't run bprdreq -rereadconfig afterwards, should I have done that?)
05-27-2016 10:20 AM
Without lookng, I am not sure what you did in the GUI. As far as I know however, to achieve what you want can only be done from the command line.
bpmedia -movedb -m [media_id] -newserver [newservername] -oldserver [oldservername]
This updates the image catalog so the media is 'owned' by the newservername. Of course once expired, it may end up on a differerent machine.
05-27-2016 12:09 PM
Just move ALL volumes, it is way faster!
bpmedia -movedb -allvolumes -newserver newservername -oldserver oldservername
05-28-2016 04:40 AM
Yes, but they may be multiple media servers with tapes that are not accessable to others.
You can't just suggest moving all media without knowing the setup - unless you want to potentially break the environment.
05-31-2016 08:39 AM
Hi Martin, I just do it on the gui, go to Media & Device Management / Robots/ select a robot, highlight a tape, r-click and select "Change media owner":
Are you saying this simply doesn't work??
05-31-2016 12:07 PM
I have had "not good" results moving using the GUI, I set up some scripts on my unix master.
essentially a for next loop using bpimagelist, using date, client or policy to select media to change ownership.
for i in `bpimagelist -media -U -d "01/07/2016 02:00" -e "01/08/2016 06:30" -client "oldclient" | cut -c0-6 | sort -u`
do
echo $i
bpmedia -movedb -m $i -newserver newmediaservername -newsvr_group servergroup -oldserver oldservername
done
05-31-2016 07:42 PM
06-01-2016 08:18 AM
Just a FYI, you should define a process that can generate a list of the images for a given backup/policy/client as well as a process that can generate the media used.
Create a script that you can update and run - for example, my night shift operators re-ran a 40TB backup at 20:30 last night that they should not have.
I was able to run a script that A.) inactivated all the SLP for that policy after 20:30, B:) cancelled all SLP for that policy after 20:30, C:) expired all those redundant images.
Saved me from copying all that data to tape, although my dedupe rate was 58X last night, lol
There are many times you will need to extend expirations of images, or change ownership of media - first step is being able to seperate out the specific backups you want...