ENCINA(8) — Maintenance
NAME
sfsadmin export file - writes an SFS file to a storage device
SYNOPSIS
sfsadmin export file -server servername source [-devicetype {disk | file | tape}] [-target target] [-checkpointsize checkpointsize] [-segmentsize segmentsize] [-locktype {filelock | recordlock | nolock}] [-continue {resume | force | restart}] [-norsn] [-nodialog] [-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.
source Specifies the name of the SFS file to be exported. A source file can be the source of only one export operation at a time.
[-devicetype {disk | file | tape}]
Specifies the type of device to which the SFS file is being exported. 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.
[-target target] Specifies the name of the device to which the file is being exported. For file systems, target is the name of the file. For disks, target is the name of the raw disk partition. For tapes, target is the name of the tape drive. The argument target can also be stdout, in which case -devicetype is ignored and input is read from standard output. The default target for file devices is source; there is no default target for disk and tape devices.
[-checkpointsize checkpointsize]
Specifies the number of bytes between updates of the checkpoint file created by the SFS during export. If checkpointsize is 0, no checkpoints are made. For tapes, checkpointsize must either be segmentsize or 0. The default is 1 megabyte.
[-segmentsize segmentsize]
Specifies the number of bytes in the segments to be exported to file or tape devices. A segment is a single file created by the SFS export facility on a file system device. On tape drives, a segment is a portion of tape between two consecutive filemarkers. (This option does not apply to disk device or the stdout target. Disks and stdout cannot be segmented.) The size of the segment must be at least 4 kilobytes. A segmentsize of 0 means that the segment size is equivalent to the size of the file or tape device. When the device is full, the SFS prompts for the name of another device, unless the -nodialog option is specified. The default is 1 megabyte.
[-locktype {filelock | recordlock | nolock}]
Specifies the type of lock placed on the export file. The default is filelock. The SFS places a read lock on the entire source file so that the source and target will be identical. If the value is recordlock, the SFS places a temporary read lock on each record as it is exported allowing other records to be modified during the export. If the value is nolock, the SFS places no locks on the file. This may allow uncommitted data to be exported.
[-continue {resume | force | restart}]
Specifies the action to be taken when resuming an interrupted export. If the value is resume, the SFS continues the export from the last checkpoint as long as source has not been modified between the failure and the continuation of the export. If the value is force, the SFS continues the export from the last checkpoint even if source has been modified. If the value is restart, the SFS starts a new export from the beginning of source. This option has no effect if no checkpoints have been made. By default, if an export is interrupted, a renewed export of the same source file will fail.
[-norsn] Specifies that no relative slot numbers (RSNs) be written to the exported file, although the RSN field is retained in the record. This option is ignored if source is not a relative SFS file.
[-nodialog] Specifies that no prompts be displayed for the name of another target when the current target is full; instead, the SFS displays a message indicating that the target is full.
[-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 export file command writes an SFS source file to the specified device. An SFS file can be exported to a file system file, a raw disk partition, a tape device, or to stdout.
Because SFS files are often large, SFS divides them into a series of 1-megabyte segments on the target device to make them more manageable. Each exported file name consists of the target file name with an appended 8-digit positive number. For example, an exported file named Inventory might appear as three 1-megabyte files named Inventory.00000000, Inventory.00000001, and Inventory.00000002. The number increases for each successive file. Breaking up the file into segments can be useful if you have limited space on your storage device. For instance, if the file system to which you are exporting is not sufficiently large to store the entire file at once, you can move an exported segment from the file system to tape in stages as new segments are being exported.
Although this number is a part of the file system name (and therefore used with operating system commands), it is not part of the SFS file name. Do not specify the appended number with subsequent sfsadmin commands.
To provide recovery in case of interruptions during an export operation, a temporary checkpoint file (source.CIE.EXP) containing the state of the export is created. When an interrupted export 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 export has A (administer) permission on the checkpoint file that is created. To successfully resume a failed export (using the -continue option), either the original user must perform the export 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 export, either the original user must perform the export (using the -continue option), or the checkpoint file must be deleted so that a new user can restart the export.
When an export is interrupted, the SFS issues an error message indicating where the interruption occurred and where the export will resume. When the export is resumed and the SFS cannot determine whether or not a record has already been exported, a permanent error log file named source.CIE.EXP.log is created. The error log file is identical in structure to the SFS file being exported, except that secondary indices are not created.
EXAMPLE
The following command exports the SFS file Inventory to a file of the same name in the user’s current directory. During export, the file will be divided into segments of 10240 kilobytes (10 megabytes). If Inventory is 50 megabytes, the resulting segments might appear as Inventory.00000000 through Inventory.0000005 in the file system directory.
% sfsadmin export file Inventory -segmentsize 10240k
The following command exports the SFS file Inventory to a raw disk partition on the target disk /dev/rsd0g.
% sfsadmin export file Inventory -target /dev/rsd0g
The following command transfers the SFS file Inventory from server /.:/branch1/server/sfs1 to server /.:/branch1/server/sfs2 using UNIX pipes:
% sfsadmin export file -server /.:/branch1/server/sfs1 Inventory -target stdout | sfsadmin import file -server /.:/branch1/server/sfs2 stdin -target Inventory -targetvolume sfs2Vol
PRIVILEGE REQUIRED
Encina SFS create (C) permission on the server
Encina SFS read (R) and query (Q) permissions on the SFS file
RELATED INFORMATION
sfsadmin import file
sfsadmin query export
— March 1997