Creating a backup policy from cli
Hi,
Is there any way to create a backup policy from command line ? (linux).
You need 5 commands to do this:
bppolicynew - create policy
bpplinfo - update attributes
bpplclients - add clients
bpplinclude - add Backup Selection
bpplsched - add schedulesSee this overview in Commands manual:
bppolicynew performs one of the following operations on a NetBackup policy:
■ Create a new policy with default attribute values.
■ Create a new policy with the same attributes as an existing policy.
■ Rename an existing policy.
Whenbppolicynew runs without -sameas or -renameto, it creates anewNetBackup
policy with default attribute values. If -M is present, the defaults that are used for
the policy definition on each master server are the defaults for that master server.
bppolicynew copies a policy by adding a new policy to the NetBackup database.
The clients, files, schedules, and attributes for the new policy are the same as
those for the existing policy. bppolicynew does not create a policy copy with the
same name as an existing policy.
If bppolicynew renames a policy, the existing association of images with the policy
is lost. This means that the images that were created before the policy was renamed
are not included in a list of images for the renamed policy. The command does
not rename a policy with the same name as an existing policy.
bpplinfo replaces the policy-attribute defaults with new values. bpplclients,
bpplinclude, and bpplsched define the clients, backup files, and schedules for
the policy. A policy needs to have at least one client, one file specification, and
one automatic schedule before it can run automatic backups.bppolicynew performs one of the following operations on a NetBackup policy:
■ Create a new policy with default attribute values.
■ Create a new policy with the same attributes as an existing policy.
■ Rename an existing policy.
When bppolicynew runs without -sameas or -renameto, it creates a new NetBackup policy with default attribute values. If -M is present, the defaults that are used for the policy definition on each master server are the defaults for that master server.
bppolicynew copies a policy by adding a new policy to the NetBackup database.
The clients, files, schedules, and attributes for the new policy are the same as those for the existing policy. bppolicynew does not create a policy copy with the same name as an existing policy.
If bppolicynew renames a policy, the existing association of images with the policy is lost. This means that the images that were created before the policy was renamed are not included in a list of images for the renamed policy. The command does not rename a policy with the same name as an existing policy.
bpplinfo replaces the policy-attribute defaults with new values. bpplclients, bpplinclude, and bpplsched define the clients, backup files, and schedules for the policy. A policy needs to have at least one client, one file specification, and one automatic schedule before it can run automatic backups.See NBU Commands manual http://www.symantec.com/docs/TECH127047 for detailed info.

