ENCINA(8) — Maintenance
NAME
sfsadmin copy file - copies the specified file and all of its indices
SYNOPSIS
sfsadmin copy file -server servername sourcefile targetfile [-targetvolume targetvolume] [-indices nindices {{index [-itargetvolume itargetvolume]}...}]
ARGUMENTS
-server servername Specifies the name of the SFS file server. The name must be registered with the DCE Directory Service. If the -server option is not specified, the default is the server defined by the environment variable ENCINA_SFS_SERVER.
sourcefile Specifies the name of the file to be copied to targetfile.
targetfile Specifies the name of the file to be created by copying sourcefile.
[-targetvolume targetvolume]
Specifies the name of the volume on which the new file will reside. If the -targetvolume option is not specified, the file is copied to the volume on which the original file (sourcefile) resides.
[-indices nindices {{index [[-itargetvolume]itargetvolume]}...}]
Specifies the number and names of the secondary indices to be copied to the new file. (By default, the primary index and all secondary indices of a file are automatically copied to the volume where the primary area of the target file resides.) Specify the number of indices to be copied as nindices and their names as index. If nindices is 0, no secondary indices are copied.
You can optionally specify the volume to which a secondary index is copied using the -itargetvolume option. If the -itargetvolume option is not specified, the index is copied to the volume where the primary area of the target file resides.
DESCRIPTION
The sfsadmin copy file command creates a copy of the specified file with identical file, record, and primary index characteristics. The issuer of the copy command receives all permissions on the created file. The new file, which has the same contents as the original source file, is managed by the same file server as that source file. By default, the file and all of its indices are copied to the volume on which the original file resides. To copy the file to a different volume, specify the -targetvolume option. To selectively copy a secondary index, specify the -indices option.
EXAMPLE
In the following example, MerchandiseOrders resides on sfsVol1. The command copies the file MerchandiseOrders to Orders, and places Orders on the volume sfsVol3.
% sfsadmin copy file MerchandiseOrders Orders -targetvolume sfsVol3
The next command copies the file MerchandiseOrders to Orders. Only one secondary index (itemIndex) is copied; the index is placed on the volume sfsVol4.
%sfsadmin copy file MerchandiseOrders Orders -indices 1 itemIndex -itargetvolume sfsVol4
PRIVILEGE REQUIRED
Encina SFS read (R) and query (Q) permissions on the source file
Encina SFS create (C) permission on the server
RELATED INFORMATION
sfsadmin destroy file
sfsadmin empty file
sfsadmin expand file
sfsadmin list files
sfsadmin query file
sfsadmin rename file
sfsadmin reorganize file
— March 1997