| rpmrestore.pl - restore attributes from rpm database |
rpmrestore.pl - restore attributes from rpm database
The rpm database store user, group, time, mode for all files, and offer a command (rpm -V ) to display a summary of the changes between install state (database) and current disk state. Rpmrestore can display detailed changes and can restore install attributes.
rpmrestore [options] [ target ]
target:
-package package apply on designed package -file filename apply on designed file -rollback logfile restore attributes from logfile (written by -log)
options:
-help brief help message -man full documentation -V, --version print version
-verbose verbose -batch batch mode (ask no questions) -n, --dry-run do not perform any change -log logfile log action in logfile
-all apply on all attributes -user apply on user -group apply on group -mode apply on mode -time apply on mtime -size apply on size (just display) -md5 apply on md5 (just display)
you should provide a target, to work on
this can be
the rpm command to control changes
rpm -V rpm
same effect (just display) but more detailed (display values)
rpmrestore.pl -n -package rpm
interactive change mode, only on time attribute
rpmrestore.pl -time -package rpm
interactive change mode, on all attributes except time attribute
rpmrestore.pl -all -notime -package rpm
batch change mode (DANGEROUS) on mode attribute with log file
rpmrestore.pl -batch -package rpm -log /tmp/log
interactive change of mode attribute on file /etc/motd
rpmrestore.pl -mode -file /etc/motd
interactive rollback from /tmp/log
rpmrestore.pl -rollback /tmp/log
batch rollback user changes from /tmp/log
rpmrestore.pl -batch -user -rollback /tmp/log
the program can read rcfile if some exists. it will load in order
/etc/rpmrestorerc
~/.rpmrestorerc
.rpmrestorerc
In this file,
# are comments,
and parameters are stored in the following format : parameter = value
example :
verbose = 0
dry-run = 1
batch = 0
you should be superuser to restore attributes, other users can only check changes
on batch mode, we recommend to use log file
(to be filled)
the program should allways exit with code 0
this program uses ``standard'' perl modules (distributed with perl core) : POSIX Digest::MD5 English Getopt::Long Pod::Usage POSIX Digest::MD5 File::stat Data::Dumper
none is known
this program can revert changes on user, group, time, properties, but not on size and md5 : it can only show the differences
Copyright (C) 2006 by Eric Gerbier This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Eric Gerbier
you can report any bug or suggest to gerbier@users.sourceforge.net
| rpmrestore.pl - restore attributes from rpm database |