Video Screencast Help

changeing "Previous Pool Name:" using command line

Created: 19 Jan 2012 • Updated: 27 Apr 2013 | 7 comments
This issue has been solved. See solution.

Hi,

 

I need to write a script to change the "Previous Pool Name:" value to scratch. What is the command that I need to run?

Thank you

Angel

Comments 7 CommentsJump to latest comment

wr's picture

Move volume to Scratch pool then move it to a different pool

  vmpool -listall  (to get volume pool numbers)

  vmchange -p (pool# for scratch) -m (mediaid)

  vmchange -p (different pool#) -m (mediaid) 

of course you can only do this with unassigned media

 

But what are you really trying to accomplish?

Workaround for this? URL http://www.symantec.com/docs/TECH69807

Will Restore -- where there is a Will there is a way

SOLUTION
Marianne's picture

The TN that Bill posted above is the only way. Unfortunately no '-pp' switch in vmchange command.

It is a manual process that will take about 2 minutes of someone's time on a daily basis to move all unassigned tapes to the scratch pool:
Sort the media by Assign Time then by Pool name. Bulk-select all non-scratch tapes, right-click, change.

This needs to be done once for all tapes. Sure it can be scripted, but it is really so quick and easy to do from the GUI that I don't see the need for a script...
 

Supporting Storage Foundation and VCS on Unix and Windows as well as NetBackup on Unix and Windows
Handy NBU Links

AngeFMadera's picture

Ok. So the GUI issues changes to the database that you are not able to perform thriugh the command line?

I’m trying to automatically move tapes that just returned from sitting on the off-site shelf and putting them in the scratch pool. These tapes were not entered into the scratch pool in the beginning. I really don't want to have the operator sit at the GUI and manually select tapes and move them around.

 Thank you

wr's picture

vmpool -listall -bx  (one time, to get volume pool numbers)

vmchange -p <scratch pool#> -m <mediaid>  (for each tape)

Will Restore -- where there is a Will there is a way

J.H Is gone's picture

from help

you can set it up so unassigned media is sent to the scratch pool.

<admin_dir_path>nbemmcmd -changesetting -machinename string [-ALLOW_MULTIPLE_RETENTIONS_PER_MEDIA 0|1|no|yes] [-AUDIT DISABLED | ENABLED] [-AUDIT_ RETENTION_PERIOD number_of_days] [-COMMON_SERVER_FOR_DUP default | preferred | required] [-DISABLE_AUTOMATIC_HOST_NAME_ADD 0|1|no|yes] [-DISABLE_BACKUPS_SPANNING_DISK 0|1|no|yes] [-DISABLE_DISK_STU_JOB_THROTTLING 0|1|no|yes] [-DISABLE_STANDALONE_DRIVE_EXTENSIONS 0|1|no|yes] [-DISALLOW_NONNDMP_ON_NDMP_DRIVE 0|1|no|yes] [-DO_NOT_EJECT_STANDALONE 0|1|no|yes] [-DONT_USE_SLAVE 0|1|no|yes] [-DRIVE_ERROR_THRESHOLD unsigned_integer] [-DRIVE_NAME_SEED 0|1|no|yes] [-emmname string] [-emmport unsigned_integer] [-MAX_REALLOC_TRIES unsigned_integer] [-MEDIA_ERROR_THRESHOLD unsigned_integer] [-MEDIA_REQUEST_DELAY unsigned_integer] [-MPMS_DISABLE_EVENTS 0|1|no|yes] [-MPMS_DISABLE_RANK unsigned_integer] [-MUST_USE_LOCAL_DRIVE 0|1|no|yes] [-NBUFS_DESTINATION_DSU string] [-NBUFS_DUP_TSU_TO_DSU 0|1|no|yes] [-NBUFS_RETENTION_LEVEL unsigned_integer] [-NON_ROBOTIC_MEDIA_ID_PREFIX string] [-PREFER_NDMP_PATH_FOR_RESTORE 0|1|no|yes] [-RETURN_UNASSIGNED_MEDIA_TO_SCRATCH_POOL 0|1|no|yes] [-SCSI_PROTECTION NONE | SPR | SR] [-SHAREDISK_MOUNT_POINT string] [-TIME_WINDOW unsigned_integer] [-UNRESTRICTED_SHARING 0|1|no|yes] [-VALIDATE_HOST_NAME 0|1|no|yes] [-VAULT_CLEAR_MEDIA_DESC 0|1|no|yes]

I don't have to know how to spell....I work on Unix.
NetBackup 7.0.1 - AIX & Windows

wr's picture

is the tapes in question were never in Scratch so they cannot return.  Once set as noted above, then yes this could help.

Will Restore -- where there is a Will there is a way

Marianne's picture

As per previous posts, all tapes must be manually changed to Scratch as and when they expire. This needs to be done ONCE only for each tape.

There is no way to change the "Previous Pool" from cmd or any other way (other than moving them into Scratch as a once-off).

Sure you can write a script to extract media-id's with no Assign Time and not in Scratch Pool and then do vmchange -p <scratch pool#> -m <mediaid> on each of them.

Supporting Storage Foundation and VCS on Unix and Windows as well as NetBackup on Unix and Windows
Handy NBU Links