lucompare - compare boot environments
/usr/sbin/lucompare [-i infile | -t] [-o outfile] BE_name [-X]
/usr/sbin/lucompare [-C file [-o outfile]] [-X]
The lucompare command is part of a suite of commands that make up the Live Upgrade feature of the Solaris operating environment. See live_upgrade(5) for a description of the Live Upgrade feature.
The lucompare command compares the contents of the current boot environment (BE) with the contents of another BE. With the -C option, lucompare compares file statistics so that you can determine which files have changed on a BE since a specified time, such as the creation time of a BE. A specified BE must be inactive and in the complete state, as reported by the lustatus(1M) command. Also, a BE cannot have a copy job scheduled, which is also reported by lustatus(1M). A specified BE cannot have any partitions mounted with lumount(1M) or mount(1M).
For each file system defined for a specified BE, lucompare compares all files with the files with the same pathnames in the current BE. The files present in the active BE, but not in the specified BE, and vice-versa, are reported. You also have the option to specify a list of files to be compared.
If you specify the -C option, instead of doing an absolute comparison of the current BE with a target BE, lucompare compares the files in a specified BE with the list of files recorded in a file. When a BE is created, lucreate(1M) creates a file named :<BE_name> in /etc/lu/compare. You can use the -C option to compare the files in a specified BE to this snapshot in /etc/lu/compare or you can compare the BE to a file previously created with the -o option. Comparing a BE to its own snapshot in /etc/lu/compare enables you to determine which files have changed on the BE since its creation.
By default, the output of lucompare is written to stdout. With the -C option, you must use the -o option to specify an output file. The output for lucompare is a list of files that differ in permissions, owner, group, or sum, along with the reason for difference. The output format is shown below:
> active BE < BE_name reason > file_name:owner:group:number_of_links:mode:type: size or major_minor number:checksum < file_name:owner:group:number_of_links:mode:type: size or major_minor number:checksum
The above fields are obtained from the stat(2) structure of the file.
The type field can be one of the following:
SYMLINK
FIFO
CHRSPC
BLKSPC
DIR
REGFIL
UNKNOW
lucompare computes checksums only if the file on the specified BE matches its counterpart on the active BE in all of the fields described above. If the checksums differ, lucompare appends the differing checksums to the entries for the compared files.
The lucompare command requires root privileges.
The lucompare command has the following options:
-C file
-i infile
-o outfile
-t
-X
BE_name
Example 1 Checking Differences Since BE Creation
The following command lists the differences in the BE s8u5 between its creation time and the present.
# lucompare -C /etc/lu/compare/:s8u5 -o /var/tmp/compare.out s8u5
Note that /etc/lu/compare/:s8u5 is the file created by lucreate upon creation of a BE. The list of differences is sent to /var/tmp/compare.out.
The following exit values are returned:
0
>0
/etc/lutab
/usr/share/lib/xml/dtd/lu_cli.dtd.<num>
See attributes(5) for descriptions of the following attributes:
|
luactivate(1M), lucancel(1M), lucreate(1M), lucurr(1M), ludelete(1M), ludesc(1M), lufslist(1M), lumake(1M), lumount(1M), lurename(1M), lustatus(1M), luupgrade(1M), lutab(4), attributes(5), live_upgrade(5)
The lucompare command makes no attempt to reconcile any differences it detects between BEs.
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |