Good evening, Joe,
On Wed, 21 Mar 2012, joe golden wrote:
Dear Geeks,
does anyone have experience w/ cloning Rackspace Cloud Server Ubunutu
Instances?
I have found that for syslog to operate smoothly, the files "syslog" and
syslog.* in /var/log should be removed and then the system should be
restarted. (If I could figure out how to restart syslog (rsyslogd) I'd do
that, but I'm a Debian guy ;-) )
To restart your syslog, try one of these:
service syslog restart
service rsyslog restart
service rsyslogd restart
/etc/init.d/*syslog* restart
So is it appropriate to run "rm -r /var/log/* /var/log/*.*" after a new clone
is instantiated? The underlying assumption being: we have a new server, it
should see a clean slate in the log files and NOT see the old logs from the
previous instance from which we cloned.
That makes some sense to me; perhaps shutting the service down,
erasing the logs, then restarting might make sense.
One perspective I might offer, for what it's worth. One of the
core ideas of a cloud server is that it's transient. Unlike physical
Linux systems that are self-sufficient and run for years, a cloud instance
might only run for 3 hours to handle a load spike, then be shut down and
erased, with no attempt to recover anything of value.
Servers in that mold would be more likely to send their logs to a
central log server rather than storing them locally. Then you don't have
to worry about stale logs from a previous clone. Simply replace
/etc/[r]syslog.conf on all your cloud instances with the single line
*.* @12.13.14.15
, where 12.13.14.15 is your central log server, and make sure that
machine is listening on udp port 514 (add "-r" to the startup params,
restart, and make sure your firewall allows 514/udp in). To test, run
logger Hello
on one of the cloud instances, and the message should show up in
/var/log/messages on the log server, with the name of the source machine.
This many not apply to what you're doing; feel free to
adjust/ignore as needed. :-)
Cheers,
- Bill
---------------------------------------------------------------------------
"Absence diminishes mediocre passions and increases great ones,
as the wind blows out candles and fans fires."
-- La Rochefoucauld
--------------------------------------------------------------------------
William Stearns ([email protected], tools and papers: www.stearns.org)
Top-notch computer security training at www.sans.org , www.giac.net
--------------------------------------------------------------------------