Video Screencast Help

netbackup 7.5 bpexpdate

Created: 24 Jan 2013 • Updated: 23 Sep 2014 | 17 comments
This issue has been solved. See solution.

Hi,

Can I change all data already been backed up with 1 month expiration to 1 year? I'm not talking about policy itself which I have already changed , but only of

Past jobs that still not deleted from my disk pool (puredisk volume)

Cheers,

Itai

Discussion Filed Under:

Comments 17 CommentsJump to latest comment

RamNagalla's picture

yes, you can do that..

for that you need to have the image/backup id list or Media id were the images located. 

use the bpexpdate -recaulcate -b <backup id> -d MM/DD/YYYY HH:MM:SS 

where -b is the backup id/Image id of the job that you want to chage

-d is the date that you want to keep.

for more options please check below. T/N

http://www.symantec.com/business/support/index?pag...

SOLUTION
Itai's picture

thanks for your reply

Can I do it at once on all DP without the specified backup id (s)? it's a lot..

Nicolai's picture

http://www.symantec.com/docs/HOWTO43656

No - use can use policy, retention level or schedule. See the link I provided. Please do some test before firing off the command to change them all. bpexpdate can be a dangerous command.

Personally I wold go for a per image id. use can use bpimmedia to retrieve the images located on the  puredisk volume and then process them.

Assumption is the mother of all mess ups.

If this post answered your'e qustion -  Please mark as a soloution.

Possible's picture

Here is the small script..but u need backup ids :(

Put all image ids in extend.txt and pass it as parametrs to command.

for i in `cat /temp/extend.txt`
do
cd /usr/openv/netbackup/bin/admincmd
./bpexpdate -backupid $i -d 12/2/2015 -force
done

Cheers,
GS

Itai's picture

Hi

Thanks for all your replies

exported to notepad all backup id's and trying one just to feel the taste...

Getting this error:

F:\Program Files\Veritas\NetBackup\bin\admincmd>bpexpdate -recalculate -backupid 1359311545 -d 12/12/2020
Are you SURE you want to recalculate expiration dates on all images
that meet the following criteria:
backupid 1359311545

to expire on 12/12/2020 12:00:00 AM
Continue?(y/n)y
invalid command parameter

hmmmmmm

Cheers,

Itai

mph999's picture

Try running without the -recalculate option

Martin

Regards,  Martin
 
Setting Logs in NetBackup:
http://www.symantec.com/docs/TECH75805
 
Itai's picture

got another error

F:\Program Files\Veritas\NetBackup\bin\admincmd>bpexpdate -backupid 1359311545 -d 12/12/2020
Are you SURE you want to change 1359311545
to expire on 12/12/2020 12:00:00 AM y/n (n)? y
an invalid entry was encountered

Marianne's picture

This is not a backup id: 1359311545

Backup id is client-name_10-digit-number 

Try 'Images on Disk report' to get backup id's.

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

Itai's picture

tnx Marriane got it
its a bloxxxy nightmare

how can I export from bpimagelist only the image name and number (backup id) without the rest?

Marianne's picture

You never mentioned your OS? 

If Unix/Linux, you can use bpimmedia combined with 'grep' and 'awk' to just extract image id's.

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

Yasuhisa Ishikawa's picture

Try "bpimagelist -idonly".

Or, search in GUI, select images, [Edit]-[Copy], paste into Notepad or so, and save as text. Then run like below(assuming saved as C:\test.txt).

C:\> set PATH=%PATH%;C:\Program Files\Veritas\NetBackup\bin\admincmd
C:\> FOR /F "tokens=1" %i in (C:\test.txt) DO bpexpdate -backupid %i -d 12/12/2020 23:59:59 -force

Authorized Symantec Consultant(ASC) Data Protection in Tokyo, Japan

Itai's picture

the -idonly is great, but shows only new images, thanks anyway

Marianne's picture

Add a start date to bpimagelist with '-d mm/dd/yyyy'

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

Marianne's picture

Please select the post that has helped you most and Mark As Solution.

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

Itai's picture

Just to conclude:

ran via gui on catalog using view backupid only, copied all to txt file

keep it as (C:\test.txt)

ran the command

FOR /F "tokens=1" %i in (C:\test.txt) DO bpexpdate -backupid %i -d 12/12/2020 23:59:59 -force

works great
kinda new in NETBACKUP but it's not boring at all, oh no :)