ENCINA(8) — Maintenance
NAME
sfsadmin import file - reads a file from a storage device and writes it to an SFS file
SYNOPSIS
sfsadmin import file -server servername [-devicetype {tape | file | disk}] source [-target target] [-targetvolume targetvolume] [-checkpointsize checkpointsize] [-continue {resume | force | restart}] [-pack] [-nodialog] [-indices nindices {{indexname [-itargetvolume itargetvolume]}...}] [-cachesize cachesize]
ARGUMENTS
-server servername Specifies the name of the 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.
[-devicetype {tape | file | disk}]
Specifies the type of device from which the source is being imported. The device can be file, disk, or tape, where file is a file system, disk is a raw disk partition, and tape is a non-rewinding tape drive. The default is file.
source Specifies the name of the device to be imported to an SFS file. For file systems, source is the name of the file. For disks, source is the name of the raw disk partition. For tapes, source is a non-rewinding tape drive. The argument source can also be stdin, in which case the -devicetype option is ignored and input is read from standard input. A source file can be the source of more than one import operation as long as the target name is different for each import operation.
[-target target] Specifies the name of the SFS file to be created. For file devices, the default is source without any pathname; for other devices, the target argument must be specified.
[-targetvolume targetvolume]
Specifies the name of the volume on which the SFS file and the primary index are to be placed. The default is the volume that contained the SFS file when it was originally exported.
[-checkpointsize checkpointsize]
Specifies the number of bytes between updates of the checkpoint file created by the SFS during the import. If -checkpointsize is 0, no checkpoints are made. The default is 1 megabyte.
[-continue {resume | force | restart}]
Specifies the action to be taken when resuming an interrupted import. If the value is resume, the SFS continues the import from the last checkpoint as long as target has not been modified between the failure of the import and its continuation. If the value is force, the SFS continues the import from the last checkpoint even if target has been modified. If the value is restart, the SFS starts a new import from the beginning of target. This option has no effect if no checkpoints have been made. By default, a renewed import of the same target file will fail.
[-pack] Specifies that records of relative SFS files be inserted consecutively without skipping slots. RSN fields are changed accordingly. This option is ignored if target is not a relative SFS file or if the source to be imported does not contain RSNs.
[-nodialog] Specifies that no prompts be displayed for the name of another device when the current device has been completely read; instead, the SFS displays a message indicating that the device has been read.
[-indices nindices {{indexname [-itargetvolume itargetvolume]}...}]
Specifies the number and names of the secondary indices to be copied to the new SFS file. (By default, all indices are automatically copied). Specify the number of indices to be copied as nindices and each name as indexname. If the value of nindices is 0, no secondary indices are copied. By default, secondary indices are copied to the volume on which the primary index is stored. You can optionally specify a different volume to store the indices using the -itargetvolume option.
[-cachesize cachesize] Specifies the size of cache in pages. The default is 256 pages (1 megabyte when the page size is the usual 4K). If -cachesize is 0, no caching is done.
DESCRIPTION
The sfsadmin import file command writes the contents and structure of a previously exported SFS file to an SFS file. This command can also be used to import the contents of a non-SFS file (for example, an ISAM file) whose format has been converted.
The source of an import can be a file system file, a raw disk partition, a non-rewinding tape device, or stdin. If source spans more than one device, the SFS prompts for the name of another target unless the -nodialog option is specified.
To provide recovery in case of interruptions during an import operation, a temporary checkpoint file (target.CIE.IMP) containing the state of the import is created. When an interrupted import is resumed (with -continue), the contents of the most recent checkpoint file is read. The number of bytes between checkpoints (the “size” of a checkpoint) determines the length of time it takes to resume the import after failure, as well as the number of error log entries that you may need to examine. By default, the size of a checkpoint is 1 megabyte. This default can be changed with -checkpointsize.
Note: A user who attempts an import has A (administer) permission on the checkpoint file that is created. To successfully resume a failed import (using the -continue option), either the original user must perform the import or the DCE ACL associated with the checkpoint file must be changed so that a new user has A (administer) permission on the checkpoint file. To successfully restart a failed import, either the original user must perform the import (using the -continue option), or the checkpoint file must be deleted so that a new user can restart the import.
When an import is interrupted, the SFS issues an error message indicating where the interruption occurred and where the import will resume. When the import is resumed and the SFS cannot determine whether or not a record has already been imported, a permanent error log file named target.CIE.IMP.log is created. The error log file is identical in structure to the SFS file being imported, except that secondary indices are not created.
EXAMPLE
Assume that the SFS file Inventory was previously exported to the current file system. (The segments from that export operation appear as the files Inventory.00000000 through Inventory.00000005.) The following command reads the exported file Inventory and writes it to an SFS file named Inventory :
% sfsadmin import file Inventory
The following command imports the contents of the disk partition/dev/rsd0g to the target SFS file Inventory on the volume from which the file was originally exported:
% sfsadmin import file -devicetype disk /dev/rsd0g -target Inventory
PRIVILEGE REQUIRED
Encina SFS create (C) permission on the server
RELATED INFORMATION
sfsadmin export file
sfsadmin query export
— March 1997