fts restore(8dfs)

Converts a dump file from bytestream format to fileset format and places it in the file system

Synopsis

fts restore -ftname name -server machine -aggregate name [-file filename] [-ftid ID]
[-overwrite] [-cell cellname] [{-noauth | -localauth}] [-verbose] [-help]

Options

-ftname name
Specifies the name of the fileset to which the file is to be restored. If the file is to be restored as a new fileset, the name must be unique within the local cell, and it should be indicative of the fileset's contents. The following characters can be included in the name of a fileset:

· All uppercase and lowercase alphabetic characters (a to z, and A to Z)

· All numerals (0 to 9)

· The . (period)

· The - (dash)

· The _ (underscore)

The name must contain at least one alphabetic character or an _ (underscore) to differentiate it from an ID number. It can be no longer than 102 characters. This length does not include the .readonly or .backup extension that is added automatically when a read-only or backup version of a DCE LFS fileset is created. Note that the .readonly and .backup extensions are reserved for use with read-only and backup DCE LFS filesets, so you cannot specify a fileset name that ends with either of these extensions.

-server machine
Specifies the File Server machine to which the file is to be restored. Specify the File Server machine using the machine's DCE pathname, the machine's host name, or the machine's IP address.

-aggregate name
Specifies the device name, aggregate name, or aggregate ID of the aggregate or partition on -server to which the file is to be restored. These identifiers are specified in the first, second, and fourth fields of the entry for the aggregate or partition in the dcelocal/var/dfs/dfstab file.

-file filename
Specifies the complete pathname of the file to be restored. If a complete pathname is not provided, the file is assumed to reside in the current working directory. If this option is omitted, the data is read from standard input (stdin).

-ftid ID
Specifies the fileset ID number to assign to the restored fileset. If this option is omitted and an existing fileset is to be overwritten, the fileset ID number of the existing fileset is used. If it is omitted and a new fileset is to be created, the FL Server allocates a new fileset ID number for the fileset. Use this option only when restoring a dump file as a DCE LFS fileset; use it sparingly and with great care. Omit this option when restoring a dump file as a non-LFS fileset.

-overwrite
Specifies that the file to be restored can overwrite an existing fileset. If this option is omitted, the command exits without overwriting an existing fileset. You must use this option to overwrite a previously restored version of a fileset with an incremental dump of the same fileset; more information about conditions that must be met if a fileset is to be overwritten by an incremental dump is provided later in this reference page. You must also use this option to restore a dump file as a non-LFS fileset.

-cell cellname
Specifies the cell where the command is to be run. The default is the local cell of the issuer of the command.

-noauth
Directs fts to use the unprivileged identity nobody as the identity of the issuer of the command. If you use this option, do not use the -localauth option.

-localauth
Directs fts to use the DFS server principal name of the machine on which the command is issued as the identity of the issuer. Use this option only if the command is issued from a DFS server machine (a machine that has a DFS server principal in the local Registry Database). You must be logged into the server machine as root for this option to work. If you use this option, do not use the -noauth option.

-verbose
Directs fts to provide detailed information about its actions as it executes the command.

-help
Prints the online help for this command. All other valid options specified with this option are ignored.

Description
The fts restore command translates a dump file created previously with the fts dump command from a bytestream format to a fileset format appropriate for the machine specified with the -server option. The dump file to be restored is indicated with the -file option. If this option is omitted, the data to be restored is read from stdin.

The fileset contained in the dump file can be restored as a new read/write DCE LFS fileset by specifying a name and site for the new fileset. The command assigns the fileset the name indicated with the -ftname option. It restores it to the site specified with the -server and -aggregate options. The dump file must contain the full dump of a fileset if it is to be restored as a new fileset.

Alternatively, the fileset contained in the dump file can be restored over an existing read/write version of the same fileset by specifying the name and site of the existing fileset. The command resets the creation time stored in the fileset's header to match the restore time. The -overwrite option must be used to specify that the dump file is to overwrite the existing fileset. If this option is omitted, the command displays an error message and exits instead of overwriting the existing fileset.

When restoring a dump file as a non-LFS fileset, the fileset must already exist for the non-LFS partition on which it resides to be exported to the DCE namespace. In this case, you must use the -overwrite option to overwrite the existing non-LFS fileset (even if the fileset to be overwritten contains no data).

If you are overwriting an existing fileset with an incremental dump, the fileset to be overwritten should initially have been restored as a new read/write fileset from a full dump. Also, both the dump file to be restored and the full dump that initially produced the read/write fileset to be overwritten must be dumps of the same fileset. (A full dump of a fileset can be restored to overwrite an existing fileset, but the restored dump file overwrites all data in the existing fileset. An incremental dump of a fileset cannot be restored to overwrite an existing fileset that was not created from the restoration of a full dump.)

Multiple incremental dumps of a fileset can be restored to overwrite the same existing fileset provided the following conditions are true:

· The fileset to be overwritten must not have been modified (that is, no files added, removed, or saved, and no ACLs changed) since its most recent restoration from a full or incremental dump.

· The dump file to be restored must have been created from a date and time (as specified with the -date or -version option of the fts dump command) no later than the date and time at which the most recently restored dump of the fileset to be overwritten was dumped.

· The dump file to be restored must have been created at a date and time later than the date and time at which the most recently restored dump of the fileset to be overwritten was dumped.

The last two conditions indicate that the span of time recorded in the incremental dump to be restored must overlap and extend the span of time recorded in the fileset to be overwritten. For example, suppose the following dumps were made of a fileset: a full dump was made on 1 January 1992; an incremental dump from 31 December 1991 was made on 7 January 1992; and an incremental dump from 6 January 1992 was made on 14 January 1992. The following sequence of operations represents the only possible way to restore the fileset from all three of these dumps:

1. The full dump made on 1 January is restored as a new read/write fileset.

2. The incremental dump made on 7 January is restored to overwrite the read/write version of the fileset made from the full dump.

3. The incremental dump made on 14 January is restored to overwrite the read/write version of the fileset that includes data from the full and first incremental dumps.

No other sequence of restore operations involving all three dumps is possible. Any other sequence of steps will undoubtedly result in some or all of the data in the fileset being inaccessible or inconsistent.

When restoring a dump file as a DCE LFS fileset, a fileset ID number can be assigned to the restored fileset with the -ftid option. This is generally not recommended unless there is good reason to believe that an available fileset ID number can be specified. If the -ftid option is omitted, an overwritten DCE LFS fileset retains its current ID number, or the FL Server allocates a new ID number for a new DCE LFS fileset restored from a dump file. If a new fileset ID number is assigned or allocated, the FL Server increments the number of fileset entries recorded as residing on the specified File Server machine in the Fileset Location Database (FLDB) entry for the server.

When restoring a dump file as a non-LFS fileset, do not use the -ftid option. Omit the option to continue to use the fileset ID number specified for the non-LFS fileset in the entry for its partition in the dfstab file. (Note that the restored dump file overwrites all data on the non-LFS partition.)

If a new fileset is created, use the fts crmount command to create a mount point for the fileset, making it visible in the DCE namespace. If an existing DCE LFS fileset is overwritten with this command, use the fts update command to release new read-only replicas based on the new version of the fileset, and use the fts clone command to create a new backup version of the fileset, as necessary.

You can use the fts restore command to restore a dump file to any type of fileset (DCE LFS or non-LFS), regardless of the type of fileset from which it was created. For example, a dump file of a DCE LFS fileset can be restored to a DCE LFS fileset or to any type of non-LFS fileset. Similarly, a dump file of a non-LFS fileset can be restored to a DCE LFS fileset or to a different type of non-LFS fileset. In any case, the contents of the dump file are translated into the appropriate format for the file system to which they are restored. (Refer to your vendor's documentation to verify the level of support for dump and restore operations between different types of file systems.)

Note that incompatible information may be lost when a fileset is dumped and restored between different types of file systems. For example, ACLs on objects in a DCE LFS fileset may be lost if the fileset is restored to a file system that does not support ACLs.

You cannot restore a fileset dumped in one cell to a site in another cell.

Privilege Required
The issuer must be listed in the admin.ft file on the machine specified by -server and must have the read permission on the dump file. The issuer must also be listed in the admin.fl files on all Fileset Database machines or own the server entry for each machine on which a version of the fileset is recorded as residing in the FLDB (generally only -server unless an existing fileset is to be overwritten).

Cautions
Ensure that all of the conditions discussed in the description section are met before restoring an incremental dump of a fileset over an existing fileset. Violation of any of the conditions is very likely to result in inaccessibility or inconsistency of some or all of the data in the fileset.

Examples
The following example restores a file, /tmp/smith.013191.dump, that contains an incremental dump of a fileset over an existing read/write version of the same fileset, user.smith. The incremental dump was created using a start date and time no later than the date and time when the most recently restored version of the fileset to be overwritten was dumped, and it was dumped at a date and time later than the date and time when the most recently restored version of the fileset to be overwritten was dumped. Also, the fileset to be overwritten has not been modified since it was last restored. The -ftid option is omitted, so the fileset retains its current fileset ID number.

$ fts restore user.smith /.../abc.com/hosts/fs1 lfs1 /tmp/smith.013191.dump -overwrite

The following command takes input directly from an fts dump command to create a new read/write fileset, user.terry, from an existing fileset, user.smith. The -file option is omitted from the fts dump command to send the output to stdout, and it is omitted from the fts restore command to read the input from stdin. (The information is "piped" from one command to the next.) The -ftid option is again omitted from the fts restore command; this time the FL Server allocates a new ID number for the fileset.

$ fts dump user.smith -time 0 | fts restore user.terry /.../abc.com/hosts/fs1 lfs1

Related Information
Commands: fts clone(8dfs)

fts crmount(8dfs)

fts dump(8dfs)

fts update(8dfs)

Files: dfstab(4dfs)