cancel
Showing results for 
Search instead for 
Did you mean: 

Backup and restore through command line NBU 6.5.5

Vapulaflo
Level 4
Hi guys,

I know easily the way to backup datas from command line....

But some "Unix guys" here, do not want to launch an export display, and the jbpSA. They exclude totaly the normal way to restore by the graphical console... What a pitty... They justify this choice because an ssh connection is more robust than an export display!!! What a good joke...

Firstly, I think to use the backupid that is logged on the backup log, but it seems that it is not possible...
Secondly I think to use the '-k' option with keyword phrase ( with an unique keyword phrase by client...) to realise the backup and the restore process.... 

The idea is to use 1 command for backup, and 1 command for the restore... But it seems there is more steps between those two tasks as the graphical interface do...

So if a people have use this kind of 'command line' technics for restore, it would be great to know more about experience like this.


Thanks in advance,

1 ACCEPTED SOLUTION

Accepted Solutions

Andy_Welburn
Level 6
How to run bprestore from the command line to restore information to an alternate path and/or client
http://seer.entsupport.symantec.com/docs/249076.htm

So, maybe something along the lines of:

bprestore -B -L <progress log> -R <RenameFileList> -s <date> -e <date>-f <RestoreFileList>|filenames

View solution in original post

10 REPLIES 10

Ed_Wilts
Level 6

Although the we do use the GUIs, for many of our restores, the command line is actually simpler to use.  With a little bit of scripting, the task is straight-forward.  I simply edit a template script, fill in the client server name, destination server name, a list of files to be restored, and an alternate destination path if required.  We kick it off with an optional range of dates to restore from.  All of the restores are logged.

The script determines if the restore requires sudo and uses it if required so the DBAs can do their own restores.

Our scripts can also run via cron which we do for some automated restore testing.

Given a choice, I prefer the command line.  One of my coworkers prefers the GUI.  We both get the job done.

We also have scripts that monitor pending mount requests and email us when a restore is launched for which the tapes aren't in the library.  It also automatically suspends the job.  When the jobs are injected, it automatically resumes the jobs.

I also do restores for our master server located half way around the planet.   Launching the GUI is considerably more hostile than launching an ssh session when you have 300ms ping times.

CRZ
Level 6
Employee Accredited Certified

Does it have to be a single command, or can you get away with telling them about our menu user interface (bp - /usr/openv/netbackup/bin/bp) and let them at it that way?

If it has to be a single command, I'd get ready to sit down with a copy of the Commands Guide and the man pages for bpbackup and bprestore.

Vapulaflo
Level 4
I have found a solution for bpbackup that answer to my prerequisite.
But with all the tests that I've made for bprestore, I have found a 144 error code... Can anyone show an simple example of the syntax to use and after I will adapt with the parameters I have on my config?

the bprestore -help or man bprestore are not really clear...

Kiran_Bandi
Level 6
Partner Accredited
Veritas NetBackup 6.5 commands for UNIX and LINUX Guide
http://seer.entsupport.symantec.com/docs/290234.htm
check out page no 289.
Hope this will help.

Andy_Welburn
Level 6
the restore is :

  1. to same or different client
  2. to same or different name/path
  3. most recent or specific image
  4. etc.

Vapulaflo
Level 4
1. to same client
2. to same or alternate name/path
3. specific image


:)

Andy_Welburn
Level 6
How to run bprestore from the command line to restore information to an alternate path and/or client
http://seer.entsupport.symantec.com/docs/249076.htm

So, maybe something along the lines of:

bprestore -B -L <progress log> -R <RenameFileList> -s <date> -e <date>-f <RestoreFileList>|filenames

Vapulaflo
Level 4
I do not understand why it is not possible to call a restore by the backup_id....

I think I would be great to add this parameter on the bprestore command for the future release

Marianne
Level 6
Partner    VIP    Accredited Certified

If you have a look at the images folder on the master server, you will see that backups are stored by client name, then by backup date.  The date associated with the backup-id can be used in the -s and -e field.

To get the date, run:
bpdbm -ctime <10-digit-number>

Have you tried the text-based menu (bp) as suggested by Chris?

Vapulaflo
Level 4
To be sure : The date associated with the backup-id can be used in the -s and -e field.

To get the date, run:
bpdbm -ctime <10-digit-number>



I understand that I ve got to convert the '10-digit-number' to get the date on the good format?
Right?


And for the bp menu, I have test it but I think few commands in a script would be more efficient. The bp menu is soo archaic to my mind and not really comfortable.;.