Forum Discussion

inn_kam's avatar
inn_kam
Level 6
6 years ago

How To Cancel SLP 1000 Images nbstlutil cancel using script in windows

Hi

Our Mission  is to cancel a list of more than 1000 images called in SLP.

I Found one post atatched below of Marraine. calling script in linux, to delete images from txt file.

Can any one help me to change this script in Windows

i have made this script  , help me that where is the mistake

FOR   %%G  IN "echo C:\Users\dveribackup\Documents\old_slp_images_dec18.txt"  DO  D:\Program Files\Netbackup\bin\admincmd\nbstlutil cancel -backupid %%G

 

 

https://vox.veritas.com/t5/NetBackup/SLP-Images-Removel/td-p/694925

You will need to identify the jobs that you want to cancel, compile a list of backup-id's, then cancel them with this command:

nbstlutil cancel -backupid <backupid>

You can add the list of backup id's to a text file (e.g. /tmp/image.txt), then cancel them using a 'for' loop:

for i in `cat /tmp/image.txt`
do
nbstlutil cancel -backupid $i
done

 

 

  • Great

    i have ran the below command , and successfully able to delete all the images before 8 dec 2018

     

    nbstlutil cancel -lifecycle DD_Repli_SLP -before 12/08/2018 

3 Replies

  • or can i use this command ,

    will it delete only images before 12 december 2018?

     

    nbstlutil cancel -lifecycle <name of the SLP> -before 12/08/2018 00:00:00

    if yes, then will it delete copy 2 images? then how i will delete remaining copy 1 images after this command

    • inn_kam's avatar
      inn_kam
      Level 6

      Great

      i have ran the below command , and successfully able to delete all the images before 8 dec 2018

       

      nbstlutil cancel -lifecycle DD_Repli_SLP -before 12/08/2018 

      • inn_kam's avatar
        inn_kam
        Level 6

        nbstlutil — run the NetBackup storage lifecycle policies utility

        https://www.veritas.com/support/en_US/doc/123533878-127136857-0/v123553953-127136857

         

        SYNOPSIS

        nbstlutil active [-lifecycle name] [-destination name] [-before mm/dd/yyyy hh:mm:ss | -after mm/dd/yyyy hh:mm:ss]

        nbstlutil inactive -lifecycle name | -destination name [-reactivation_time mm/dd/yyyy hh:mm:ss | -duration hours] [-before mm/dd/yyyy hh:mm:ss | -after mm/dd/yyyy hh:mm:ss]

        nbstlutil inactive -lifecycle name -destination name [-reactivation_time mm/dd/yyyy hh:mm:ss | -duration hours] [-before mm/dd/yyyy hh:mm:ss | -after mm/dd/yyyy hh:mm:ss]

        nbstlutil cancel [-lifecycle name | -destination name] [-version number] [-before mm/dd/yyyy hh:mm:ss | -after mm/dd/yyyy hh:mm:ss] [-nowarn]

        nbstlutil active | inactive | cancel -backupid id_value

        nbstlutil diskspaceinfo [-stype server_type]

        nbstlutil list [-l | -U | -b] [-rt I | IC | ICF | ICFS] [-lifecycle name [-version number] [-destination name] | -lifecycle_only | -backupid value | -jobid value] [-client name] [-mediaid value] [-mediaserver name] [-storageserver name] [-image_state value] | -copy_state value | -frag_state value | -image_incomplete | -image_inactive | -copy_incomplete | -copy_inactive] [-copy_type value] [-policy name] [-before mm/dd/yyyy hh:mm:ss | -after mm/dd/yyyy hh:mm:ss]

        nbstlutil pendimplist

        nbstlutil redo -backupid value -slpindex value

        nbstlutil repllist [-l] [-U] [-sincetime timeval]

        nbstlutil report [-lifecycle name [-version number]] [-client name] [-mediaid value] [-mediaserver name] [-storageserver name]

        nbstlutil stlilist [-l] [-U] [[[-lifecycle name] [-destination name]] | -backupid value] [-client name] [-mediaid value] [-mediaserver name] [-image_state value | -image_incomplete | -image_inactive] [-copy_type value]

         

        On UNIX systems, the directory path to this command is /usr/openv/netbackup/bin/admincmd/

        On Windows systems, the directory path to this command is <install_path>\NetBackup\bin\admincmd\