<<

NAME

cmp_sysprefs.pl

SYNOPSIS

cmp_sysprefs.pl -help

cmp_sysprefs.pl -cmd backup -file prefbackup

cmp_sysprefs.pl -cmd compare -file prefbackup -upd

cmp_sysprefs.pl -cmd compare -file prefbackup -del -ign-opt

cmp_sysprefs.pl -cmd restore -file prefbackup

DESCRIPTION

This script may backup, compare and restore system preferences from file.

Precaution: only the last command or file name will be used. The add, del and upd parameters are extensions for the compare command. They allow you to act immediately on the compare results.

When restoring a preferences file containing a version pref to a database having another version, the restore will not be made. Similarly, a version pref will never be overwritten. A restore will overwrite prefs but not delete them.

It is possible to edit the preference backup files. But be careful. The first parameter for each preference is a line count. Some preference values use more than one line. If you edit a file, make sure that the line counts are still valid.

You can compare/restore using edited/partial preference files. Take special care when using the del parameter in comparing such a partial file. It will delete all prefs in the database not found in your partial file. Partial pref files can however be very useful when testing or monitoring a limited set of prefs.

The ign-opt flag allows you to delete preferences that have explanation or options in the database. If you do not set this flag, a compare with delete will by default only delete preferences without explanation/options. Use this option only if you understand the risk. Note that a restore will recover value, not explanation or options. (See also BZ 10199.)

-help

Print this usage statement.

-cmd

Command: backup, compare, restore or test.

-file

Name of the file used in command.

-add

Only for compares: restore preferences not present in database.

-del

Only for compares: delete preferences not present in file.

-upd

Only for compares: update preferences when values differ.

-ign-opt

Ignore options/explanation when comparing with delete flag. Use this flag with care.

<<