cancel
Showing results for 
Search instead for 
Did you mean: 

Back up specific files from NetBackup master command-line

zfardea
Level 3

I would like to start a backup of specific files only.

With bpbackup I can do this using the -f flag or a files list, but only when running bpbackup on the client. When running from the master with the -i flag, this feature is not supported.

So is there any way the master can be told to back up specific files on a client?

1 ACCEPTED SOLUTION

Accepted Solutions

revarooo
Level 6
Employee

bppolicynew <new_policy_name> -sameas <existing_policy_name>

Then you can manipulate the new_policy_name with the previous commands I posted

To remove:

bppldelete <new_policy_name>

View solution in original post

15 REPLIES 15

revarooo
Level 6
Employee

Should work:

 

       -i     Starts an immediate manual backup. This operation is equivalent to starting a manual backup from the NetBackup administrator interface. You must be the administrator on the master server to use the -i option.

 

Are you logged in as the administrator? What version of NBU are you using?

Marianne
Level 6
Partner    VIP    Accredited Certified

bpbackup -i on the master server will start policy schedule type Full or Incr (not User type) and the file and folder names in Backup Selection will be used. Same as right-click on a policy in the GUI and select Manual Backup.
So, here the files/folders need to be in Backup Selection.

bpbackup on a client will start a User type schedule in the policy where files/folders can be typed as part of the command or a filename with -f option.
Backup Selection is ignored.

Removed
Level 3

I think he wants to intiage a backup from the master side but backup something else than what the policy states in the include list. Basically a 'userbackup' type of backup only not initiated from the client side.

Don't think that actually works.

zfardea
Level 3

Christoph and Marianne are right, the goal is to initiate a backup from the master server (i.e. with -i), but use a custom file selection different from what's defined in the policy.

According to the manual (haven't tested it myself), this functionality is available when backuping up from the client (without -i), but not when backing up from the server (with -i).

Does anybody know another way of achieving this, maybe with some other command?

revarooo
Level 6
Employee

What is the master OS and client OS? Perhaps if unix you could use rsh/ssh to remote connect from master to client, to initiate a user-initiated backup ???

zfardea
Level 3

Some endpoints are Linux and other Windows.

As a last resort I could definitely use SSH and other remote access tools to run from the client itself, but that would immensely complicate the solution - it would require assuring that I have connectivity and access credentials to all the servers, as well as setting up remote access to Windows servers too.

It would be way simpler if there was a way of doing this from the master side.

 

Andy_Welburn
Level 6

It would be way simpler if there was a way of doing this from the master side.

Agreed. Almost seems to be an 'oversight' that there is no equivalence of the bpbackup 'versions'.

 

Only other alternative, which Marianne has already alluded to, is to have a policy that you would then add your file selections to - this could potentially be scripted I suppose if required - & then instigate the bpbackup (manual backup) of that policy from the master.

revarooo
Level 6
Employee

I agree with Andy. You could script it on the master (If its UNIX), so have a policy with no open windows, for unix and for windows so it never runs with nbpem scheduler.

Add all the clients to it then use bpplinclude to add the file you want to backup to the policy, then run a manual backup ? then use bpplinclude to remoe the file from the Backup Selection in the policy?

Or you could even add the clients on the fly too with bpplclients too.

 

 

 

zfardea
Level 3

Cool hack!

The next logical step though, if I want to support any policy without manipulating it, is to create a modified copy of the policy, use it, then remove it.

Would that work? What would happen to the snapshots once the temporary policy is removed?

revarooo
Level 6
Employee

bppolicynew <new_policy_name> -sameas <existing_policy_name>

Then you can manipulate the new_policy_name with the previous commands I posted

To remove:

bppldelete <new_policy_name>

zfardea
Level 3

Thanks!

zfardea
Level 3

Would it be possible to run differential backups this way? Or because it's a new policy full backup must be used?

revarooo
Level 6
Employee

Because it's a new policy, you have to run a FULL, there is no previous backup to this policy for it to know about any backed up files before

zfardea
Level 3

Thanks Andy!

Andy_Welburn
Level 6

You're welcome.

 

Should be fun putting it all together & getting it to work as required!