PRESERVE(1M) RISC/os Reference Manual PRESERVE(1M)
NAME
preserve - save selected release files for update installa-
tion
SYNTAX
preserve [ -r | -s ] version
DESCRIPTION
preserve is used to save a selected list of files on a sys-
tem receiving an update of a software package. It is usually
used along with findmods (see findmods(1M)) to insure that
no local modifications of files present in the update will
be overwritten when installing the release.
Exactly one of the options -s or -r must be used. The -s
(save) option is used before the update files are written to
the target system. -r (restore) is used after the update
files have been written. The argument version identifies
the version of the package being installed. The version will
be used as a tag to identify files saved by preserve when
installing this version of the software package.
The actions performed by preserve are determined by the
option flag used, and a newline separated list of pathnames
provided on its standard input. The pathnames are given
relative to the root directory of the package. This is the
same convention as used by comply for pathnames in the
software bill of materials files (``bomfile''s; see
comply(1M)) for a description of the pathname format).
The input to preserve is usually a concatenation of the out-
put from findmods and a default list naming the set of files
in the package which are expected to be modified locally.
(For example, in the RISC/os package, this would include
/etc/passwd, etc/hosts, and so on).
By providing a default list, a safer update installation can
be performed on a system where a valid /etc/installlog file
is not present. (See installlog(4) for a description of
/etc/installlog).
Each pathname may be followed by one of three option flags
which modifies preserve's behavior when processing that
file. The options are:
(no flags)
All files named by findmods take this default action.
The file pathname present on the target system will be
saved as ``pathname:version:'' before the file from
the release is written to the target system.
-k (``keep'')
Printed 11/19/92 Page 1
PRESERVE(1M) RISC/os Reference Manual PRESERVE(1M)
The file pathname present on the target system prior to
the installation of the update should be kept as path-
name. The file read from the update will be saved as
``pathname:version+''.
-u (``use update'')
The use of the file supplied on the update is forced.
The file pathname present on the target system will be
saved as ``pathname/:version:'' before the file from
the release is written to the target system. This
option takes precedence over the others. This is impor-
tant for files where failure to use the new version (or
a converted copy of the local version) would render the
system or software package inoperative.
-d The file pathname is no longer a part of this software
package, and will be removed from the target system.
There is an extremely rare case where a preserved file bears
exactly the same modification time as the file installed
from the release. If such a file is restored to its origi-
nal name (as with the -k option), the file would appear to
be from the release associated with that modification time.
This could interfere with the use of preserve when future
releases are installed. Therefore, in these cases, the
modification time of the file will be increased by one
second when it is restored, so that it can still be identi-
fied as a user-modified file when future releases are
installed.
It is important to note that when the version appears in the
pathname of a saved file, it does not mean that the file
came from version version of the software package, but
merely that the the file was saved when version version was
installed.
Take care to collect and keep copies of the :ver: files
saved by preserve, since they can be lost if the same update
is reinstalled later.
Currently, preserve depends on the availability of enough
extra space on the file system(s) receiving the update to
hold both the files from the update and the preserved files.
Therefore, it is not recommended that en mass copys of pre-
vious releases be preserved with preserve, as could be
caused by touching all of the files named in the bomfiles
for the package. This should be accomplished by more tradi-
tional methods of backup.
FILES
/usr/pkg/bin/preserve
Page 2 Printed 11/19/92
PRESERVE(1M) RISC/os Reference Manual PRESERVE(1M)
SEE ALSO
findmods(1M).
Printed 11/19/92 Page 3