03-04-2009 09:05 AM
Hi all,
I have to copy images from a old tape to a new tape with bpduplicate
I have tried with "bpduplicate -id <media ID> -dp <destination pool>"
Netbackup start and exit the job with EX 144 -> invalid command usage.
What is the appropriate bpduplicate switches? I am collapsed with this command "bpduplcate"
Thanks.
Kind Regards
Solved! Go to Solution.
03-04-2009 09:21 AM
# bpduplicate -help
bpduplicate: -npc <new primary copy> -backupid <backup id> [-local] [-client <name>]
bpduplicate: [-dstunit <destination storage unit label>[,<stunit-copy2>,...,<stunit-copyn>]]
[-p] [-pb] [-PM] [-PD] [-v] [-local] [-client <name>]
[-Bidfile <file_name>]
[-st <sched_type>] [-sl <sched_label>] [-L <output_file> [-en]]
[-dp <destination pool name>[,<poolname-copy2>,...,<poolname-copyn]]
[-owner <media_share_grp>[,<share_grp-copy2>,...,<share_grp-copyn]]
[-shost <source host>]
[-policy <name>] [-s mm/dd/yyyy HH:MM:SS] [-e mm/dd/yyyy HH:MM:SS]
[-pt <policy_type>] [-hoursago <hours>]
[[-cn <copy number>] | [-primary]]
[-M master_server] [-altreadhost <hostname>]
[-backupid <backup_id>] [-id <media_id>]
[-rl <retention_level>[,<rl-copy2>,...,<rl-copyn>]]
[-fail_on_error <0 | 1>[,...,<0 | 1>]]
[-mpx] [-priority <number>] [-number_copies <number>]
[-set_primary <copy_index>] [-bc_only] [-granular_proxy <hostname>]
[-dcn <destination copy number 1>[,<dcn-copy2>,...,<dcn-copyn>]]
Valid values for sched_type:
FULL, INCR, CINC, UBAK, UARC, NOT_ARCHIVE
Valid values for policy_type:
Standard, Oracle, Informix-On-BAR, Sybase,
MS-SharePoint, NetWare, DataTools-SQL-BackTrack,
MS-Windows-NT, OS/2, MS-SQL-Server, MS-Exchange-Server,
SAP, DB2, NDMP, FlashBackup, Split-Mirror,
AFS, DataStore, Lotus-Notes, NCR-Teradata,
FlashBackup-Windows, NBU-Catalog, Generic,
PureDisk-Export
Valid values for copy_index:
0 = do not change primary copy(default)
1 = 1st new copy will be primary
2 = 2nd new copy will be primary ...
n = nth new copy will be primary
03-04-2009 09:21 AM
# bpduplicate -help
bpduplicate: -npc <new primary copy> -backupid <backup id> [-local] [-client <name>]
bpduplicate: [-dstunit <destination storage unit label>[,<stunit-copy2>,...,<stunit-copyn>]]
[-p] [-pb] [-PM] [-PD] [-v] [-local] [-client <name>]
[-Bidfile <file_name>]
[-st <sched_type>] [-sl <sched_label>] [-L <output_file> [-en]]
[-dp <destination pool name>[,<poolname-copy2>,...,<poolname-copyn]]
[-owner <media_share_grp>[,<share_grp-copy2>,...,<share_grp-copyn]]
[-shost <source host>]
[-policy <name>] [-s mm/dd/yyyy HH:MM:SS] [-e mm/dd/yyyy HH:MM:SS]
[-pt <policy_type>] [-hoursago <hours>]
[[-cn <copy number>] | [-primary]]
[-M master_server] [-altreadhost <hostname>]
[-backupid <backup_id>] [-id <media_id>]
[-rl <retention_level>[,<rl-copy2>,...,<rl-copyn>]]
[-fail_on_error <0 | 1>[,...,<0 | 1>]]
[-mpx] [-priority <number>] [-number_copies <number>]
[-set_primary <copy_index>] [-bc_only] [-granular_proxy <hostname>]
[-dcn <destination copy number 1>[,<dcn-copy2>,...,<dcn-copyn>]]
Valid values for sched_type:
FULL, INCR, CINC, UBAK, UARC, NOT_ARCHIVE
Valid values for policy_type:
Standard, Oracle, Informix-On-BAR, Sybase,
MS-SharePoint, NetWare, DataTools-SQL-BackTrack,
MS-Windows-NT, OS/2, MS-SQL-Server, MS-Exchange-Server,
SAP, DB2, NDMP, FlashBackup, Split-Mirror,
AFS, DataStore, Lotus-Notes, NCR-Teradata,
FlashBackup-Windows, NBU-Catalog, Generic,
PureDisk-Export
Valid values for copy_index:
0 = do not change primary copy(default)
1 = 1st new copy will be primary
2 = 2nd new copy will be primary ...
n = nth new copy will be primary
03-04-2009 09:23 AM
Maintenance Commands bpduplicate(1M)
NAME
bpduplicate - create a copy of backups that NetBackup has
created
SYNOPSIS
/usr/openv/netbackup/bin/admincmd/bpduplicate -npc
new_primary_copy -backupid backup_id [-local] [-client
name]
/usr/openv/netbackup/bin/admincmd/bpduplicate
[-number_copies number] [-dstunit
destination_storage_unit_label [,copy2,...,copyn] [-dp
destination_volume_pool_name [,copy2,...,copyn] [-p |
-pb | -PD | -PM] [-Bidfile file_name] [-v] [-local]
[-client name] [-st sched_type] [-sl sched_label] [-L
output_file [-en]] [-shost source_host] [-policy name]
[-s date] [-e date] [-pt policy_type] [-hoursago hours]
[[-cn copy_number] | [-primary]] [-M master_server]
[-altreadhost hostname] [-backupid backup_id] [-id
media_id] [-rl retention_level[,rl-copy2,...,rl-copyn]]
[-fail_on_error 0|1[,...,0|1]] [-mpx] [-priority
number] [-set_primary copy_index] [-owner
media_share_grp[,share_group_copy2,...
share_group_copyn]]
DESCRIPTION
The bpduplicate command allows a copy of a backup to be
created. The bpduplicate command can also change the primary
copy in order to enable restoring from a duplicated backup.
The primary copy is used to satisfy restore requests and is
initially the original copy.
Multiplexed duplications can be created by using the -mpx
option. Refer to the discussion of the -mpx option for more
information.
The duplicated backup has a separate expiration date from
the original. Initially, the expiration date of the copy is
set to the expiration date of the original. You can change
the expiration date of the copy or the original by using the
bpexpdate command.
Use bpduplicate to create up to 10 copies of unexpired back-
ups.
Authorized users can execute this command.
For more information about NetBackup authorization, refer to
the NetBackup Security and Encryption Guide.
OPTIONS
-altreadhost hostname
SunOS 5.9 Last change: 27 Apr 2007 1
03-04-2009 09:23 AM
Maintenance Commands bpduplicate(1M)
Specify an alternate host from which to read the
media. The default condition is that bpduplicate
reads the source media from the host that per-
formed the backup.
-backupid backup_id
Specifies the backup ID of a single backup to
duplicate or for which to change the primary copy.
-Bidfile file_name
file_name specifies a file that contains a list of
backup IDs to be duplicated. List one backup ID
per line in the file. If this parameter is speci-
fied, other selection criteria is ignored.
In addition, the file that is specified with the
-Bidfile parameter is removed during the execution
of that command line interface (CLI). This action
happens because the NetBackup GUIs commonly use
this parameter. They expect the command-line
interface to remove the temporary file that was
used for the -Bidfile option upon completion.
Direct command-line interface users can also use
the option; however, it removes the file.
-client name
Specifies the name of the client that produced the
originals and is used as search criteria for back-
ups to duplicate. The default is all clients.
When you specify -client with the -npc option to
change the primary copy, NetBackup first searches
for the backup ID that belongs to the client. This
search is useful if the client name has changed.
-cn copy_number|-primary
Determines the copy number to duplicate. Valid
values are 1 through 10. The default is 1.
-primary indicates to bpduplicate to search or
duplicate the primary copy.
-dp destination_volume_pool_name [,copy2,...,copyn]
Specifies the volume pool for the duplicates. Net-
Backup does not verify that the media ID that is
selected for the duplicate copy is not the same
media ID where the original resides. Therefore, to
SunOS 5.9 Last change: 27 Apr 2007 2
03-04-2009 09:24 AM
Maintenance Commands bpduplicate(1M)
avoid the possibility of a deadlock, specify a
different volume pool than where the original
media ID resides. The default pool name is
NB_duplicates.
Specify a pool for each copy that you specify.
-dstunit destination_storage_unit_label [,copy2,...,copyn]
Specifies the destination storage unit. This
parameter is required to duplicate backups. Do not
specify this option to preview backups to be
duplicated (-p, -pb, -PM, or -PD options) or to
change the primary copy (-npc option). This option
does not have a default.
Specify a storage unit for each copy that you
specify.
-e date
-s date Specifies the end (-e) or start (-s) of the range
of dates and times that include all backups to
duplicate. The default end date is the current
date and time. The default start time is 24 hours
before the current date and time.
The format of date depends on the user's locale
setting. See the NOTES section for more informa-
tion. For the C locale, the date syntax is as fol-
lows:
mm/dd/yy [hh[:mm[:ss]]]
-fail_on_error 0|1[,0|1,...,0|1]
Specifies whether to fail the other duplications
if the copy fails, where:
0 - Do not fail the other copies
1 - Fail the other copies
Specify one for each copy that you specify.
-hoursago hours
Specifies the number of hours before the current
time to search for backups. Do not use with the -s
option. The default is the previous midnight.
-id media_id
SunOS 5.9 Last change: 27 Apr 2007 3
03-04-2009 09:24 AM
Maintenance Commands bpduplicate(1M)
avoid the possibility of a deadlock, specify a
different volume pool than where the original
media ID resides. The default pool name is
NB_duplicates.
Specify a pool for each copy that you specify.
-dstunit destination_storage_unit_label [,copy2,...,copyn]
Specifies the destination storage unit. This
parameter is required to duplicate backups. Do not
specify this option to preview backups to be
duplicated (-p, -pb, -PM, or -PD options) or to
change the primary copy (-npc option). This option
does not have a default.
Specify a storage unit for each copy that you
specify.
-e date
-s date Specifies the end (-e) or start (-s) of the range
of dates and times that include all backups to
duplicate. The default end date is the current
date and time. The default start time is 24 hours
before the current date and time.
The format of date depends on the user's locale
setting. See the NOTES section for more informa-
tion. For the C locale, the date syntax is as fol-
lows:
mm/dd/yy [hh[:mm[:ss]]]
-fail_on_error 0|1[,0|1,...,0|1]
Specifies whether to fail the other duplications
if the copy fails, where:
0 - Do not fail the other copies
1 - Fail the other copies
Specify one for each copy that you specify.
-hoursago hours
Specifies the number of hours before the current
time to search for backups. Do not use with the -s
option. The default is the previous midnight.
-id media_id
SunOS 5.9 Last change: 27 Apr 2007 3
03-04-2009 09:25 AM
Maintenance Commands bpduplicate(1M)
Search the image catalog for backups to duplicate
that are on this media ID. If the original is
fragmented between different media IDs, NetBackup
duplicates only the backups that exist on the
specified media ID. Backups that span media are
duplicated, but not any other backups on the
spanned media ID.
-L output_file [-en]
Specifies the name of a file in which to write
progress information. The default is not to use a
progress file.
Include the -en option to generate a log in
English. The name of the log contains the string
_en. This option is useful to support the person-
nel that assist in a distributed environment where
different locales may create logs of various
languages.
-local When bpduplicate runs from a host other than the
master server and -local is not used (default) the
following occurs: it starts a remote copy of the
command on the master server.
The remote copy allows the command to be ter-
minated from the Activity Monitor.
Use this option to prevent the creation of a
remote copy on the master server. You can also run
bpduplicate only from the host where it was ini-
tiated.
If the -local option is used, bpduplicate cannot
be canceled from the Activity Monitor.
-M master_server
Specifies the master server that manages the media
catalog that has the media ID. If this option is
not specified, the default is one of the follow-
ing:
For NetBackup Server:
NetBackup Server supports only one server (the
master) with no remote media servers. Therefore,
the default in this case is always the NetBackup
Server master where you run the command.
For NetBackup Enterprise Server:
SunOS 5.9 Last change: 27 Apr 2007 4
03-04-2009 09:26 AM
Maintenance Commands bpduplicate(1M)
If the command is run on a master server, then
that server is the default.
If the command is run on a media server that is
not the master, then the master for that media
server is the default.
-mpx Specifies that when you duplicate multiplexed
backups, NetBackup creates multiplexed backups on
the destination media, which reduces the time to
duplicate multiplexed backups.
Multiplexed duplication is not supported for:
o Non-multiplexed backups
o Backups from disk type storage units
o Backups to disk type storage units
o FlashBackup or NDMP backups
If backups in the previous categories are encoun-
tered during duplication, NetBackup duplicates
them first and uses non-multiplexed duplication.
Then, the multiplexed backups are duplicated by
using multiplexed duplication.
If all the backups in a multiplexed group are not
duplicated, the duplicated multiplexed group have
a different layout of fragments. (A multiplexed
group is a set of backups that were multiplexed
together during a single multiplexing session.)
If this option is not specified, all backups are
duplicated by using non-multiplexed duplication.
For more information on multiplex operations, see
the NetBackup Administrator's Guide.
-npc new_primary_copy
Allows the primary copy to be changed. The value
can be 1 through 10. The -backupid option must be
specified with this option.
-number_copies number
Specifies the number of copies to be created.
Without the Inline Tape Copy option or NetBackup
Vault extension that is installed, the value can
be set to 1 only. The default is 1.
SunOS 5.9 Last change: 27 Apr 2007 5
03-04-2009 09:27 AM
Maintenance Commands bpduplicate(1M)
Use with -dstunit, -dp, -fail_on_error, and -r1:
-number_copies 2 -dstunit
stunit-copy1,stunit-copy2
-number_copies 2 -dp pool1, pool2
share_group_copyn]
-owner media_share_group [,share_group_copy2,...
Specifies the share group for the duplicate.
Specify a share group for each copy that you
specify.
-p Previews backups to be duplicated according the
option settings, but does not perform the duplica-
tion. Displays the media IDs, server name, backups
that are not candidates for duplication (and why),
and information about the backups to be dupli-
cated.
-pb Previews the duplication but does not perform the
duplication. Similar to the -p option, but does
not display information about the backups.
-PD Same as the -PM option, except that it sorts and
displays the backups by date and time (newest to
oldest).
-PM Displays the information on the backups to be
duplicated according to the option settings, but
does not perform the duplication. This format
first displays the backup IDs that cannot be
duplicated and why (for example, because the
backup already has two copies). It displays the
following information about the backup: date and
time of the backup, policy, schedule, backup ID,
host, media ID or path, copy number, and whether
the copy is the primary copy:
1 = Primary copy
0 = Not primary copy
-policy name
Searches for backups to duplicate in the specified
policy. The default is all policies.
-priority number
Enables you to configure backup policies to run at
SunOS 5.9 Last change: 27 Apr 2007 6
03-04-2009 09:28 AM
Maintenance Commands bpduplicate(1M)
a lesser or a higher priority than disk staging
duplication.
-pt policy_type
Search for the backups that the specified policy
type created. The default is any policy type.
Valid values are:
Informix-On-BAR
Oracle
Macintosh
MS-Exchange-Server
MS-Windows
MS-SharePoint
MS-SQL-Server
NDMP
Netware
OS/2
Standard
Sybase
Note The following policy types apply only to NetBackup
Enterprise Server.
AFS
DataTools-SQL-BackTrack
DB2
FlashBackup
SAP
Split-Mirror
-rl retention_level[,rl-copy2,...,rl-copyn]
Provides a retention level for each copy that you
SunOS 5.9 Last change: 27 Apr 2007 7
03-04-2009 09:29 AM
Maintenance Commands bpduplicate(1M)
specify.
If no retention levels are specified, the expira-
tion date of the original copy is used for each
copy. If a retention period is indicated, the
expiration date for the copy is the backup date
plus the retention period.
For example, if a backup was created on November
14, 2003, and its retention period is one week,
the new copy's expiration date is November 21,
2003.
A value of -1 indicates that the original expira-
tion date is used for the copy.
-set_primary copy_index
Specify a new copy to become the primary copy.
copy_index is one of the following:
0 = Do not change the primary copy (default)
1 = First new copy is the primary copy
2 = Second new copy is the primary copy
3 = Third new copy is the primary copy, and so on.
copy_index cannot be greater than the bpduplicate
-number_copies value.
If the copy specified to be the primary copy
fails, but other copies are successful, the pri-
mary copy does not change from its current value.
-shost source_host
Specifies that only the backups that are created
on the specified backup server are considered for
duplication. The default is to consider all back-
ups regardless of the backup server.
-sl sched_label
Search for backups to duplicate that the specified
schedule created. The default is all schedules.
-st sched_type
Search for backups to duplicate that the specified
SunOS 5.9 Last change: 27 Apr 2007 8
03-04-2009 09:29 AM
Maintenance Commands bpduplicate(1M)
schedule type created. The default is any schedule
type.
Valid values are:
FULL (full backup)
INCR (differential-incremental backup)
CINC (cumulative-incremental backup)
UBAK (user backup)
UARC (user archive)
NOT_ARCHIVE (all backups except user archive)
-v Selects the verbose mode. When you specify the
debug and progress logs, it includes more informa-
tion.
NOTES
The format that you must use for date and time values in
NetBackup commands varies according to your locale setting.
If you are uncertain of the NetBackup command requirements
for your locale, enter the command with the -help option and
check the USAGE. For example, the following is the output
for the -s and -e options:
[-s mm/dd/yyyy HH:MM:SS] [-e mm/dd/yyyy HH:MM:SS]
Notice the month/day/year and hours:minutes:seconds require-
ments. These are for a locale setting of C and can be dif-
ferent for other locales.
See the locale(1) man page for detailed information.
EXAMPLES
Example 1
The following command (all on one line) lists backups with a
copy number of 1. They were backed up by the policy that is
named stdpolicy, and created between July 1, 2006, and
August 1, 2006.
bpduplicate -PM -cn 1 -policy stdpolicy -s 07/01/06 -e
08/01/06
Example 2
SunOS 5.9 Last change: 27 Apr 2007 9
03-04-2009 09:30 AM
Maintenance Commands bpduplicate(1M)
The following command can be all on one line, or you can use
a backslash continuation character. The command duplicates
copy 1 of the backups that are listed in file bidfile in the
tmp directory. The destination storage unit is unit1 and the
destination pool is dup_pool. Progress information is writ-
ten to bpdup.ls.
bpduplicate -dstunit unit1 -Bidfile /tmp/bidfile -L /tmp/bpdup.ls -dp dup_po
ol -cn 1
Example 3
The following command can be all on one line, or you can use
a backslash continuation character. It is the same as the
previous example, except multiplexed backups are duplicated
by using multiplexed duplication.
bpduplicate -dstunit unit1 -Bidfile /tmp/bidfile -mpx
-L /tmp/bpdup.ls -dp dup_pool -cn 1
FILES
/usr/openv/netbackup/logs/admin/*
/usr/openv/netbackup/db/images/*
SunOS 5.9 Last change: 27 Apr 2007 10
03-05-2009 06:02 AM
If all you're going to do is spew out the manual why not just link to it?
03-08-2009 03:21 AM
Only 10 Pages u got bob ?
03-08-2009 07:19 PM
Try add "-dstulit" option.
"bpduplicate -id <media ID> -dp <destination pool> -dstunit <destination_storage_unit>"
04-06-2009 11:05 AM
If all you're going to do is spew out the manual why not just link to it?
I'm new to the forum :)
04-06-2009 12:50 PM