On Sat, Mar 1, 2014 at 3:23 AM, Paolo De Michele
<paolo at paolodemichele.it> wrote:>
> Hi everybody,
>
> I have many server in production but I would verify this:
>
> ex.: I have many domain in /var/www/html/ (domain1 / domain2 / domain3)
>
> now,
>
> How I do check if the files are added or changed?
> I should apply this "politic" for all domains but I don't
know how
>
> It is possible send me an email with the modification?
> so, exist diff command with some option but I don't understand how to
apply it
If you installed with an rpm you can use 'rpm -q -V packagename' to
check that files haven't changed since the install.
If you have a master copy on some other server, you can use 'rsync
-avn --delete dir user at production_host:/path/above/dir' to see a
list of files with differences. And if you remove the n from the
arguement list it will fix any differences (but be very sure you are
in the right place if you use --delete without -n).
Ultimately, you should probably be using subversion or git to maintain
this master copy. If you only have one or a few production servers you
can just use the version control tools to update them directly, but I
prefer a staging copy where you can test the changes before rsyncing
to production.
--
Les Mikesell
lesmikesell at gmail.com