Merge "Ensure config/log files of mysql/mariadb are copied"
This commit is contained in:
commit
3cea68c6b2
22
copy_logs.sh
22
copy_logs.sh
@ -91,16 +91,30 @@ if [ -d /var/log/rabbitmq ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# db logs
|
# db logs
|
||||||
|
# postgresql
|
||||||
if [ -d /var/log/postgresql ] ; then
|
if [ -d /var/log/postgresql ] ; then
|
||||||
# Rename log so it doesn't have an additional '.' so it won't get
|
# Rename log so it doesn't have an additional '.' so it won't get
|
||||||
# deleted
|
# deleted
|
||||||
sudo cp /var/log/postgresql/*log $LOG_DIR/postgres.log
|
sudo cp /var/log/postgresql/*log $LOG_DIR/postgres.log
|
||||||
fi
|
fi
|
||||||
if [ -f /var/log/mysql.err ] ; then
|
# mysql/mariadb
|
||||||
sudo cp /var/log/mysql.err $LOG_DIR/mysql_err.log
|
if use_debs; then
|
||||||
|
if [ -d /etc/mysql ] ; then
|
||||||
|
sudo cp -r /etc/mysql $LOG_DIR/etc/
|
||||||
|
fi
|
||||||
|
if [ -d /var/log/mysql ] ; then
|
||||||
|
sudo cp -r /var/log/mysql $LOG_DIR/
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [ -f /etc/my.cnf ] ; then
|
||||||
|
sudo cp /etc/my.cnf $LOG_DIR/etc/
|
||||||
|
fi
|
||||||
|
if [ -d /etc/my.cnf.d ] ; then
|
||||||
|
sudo cp -r /etc/my.cnf.d $LOG_DIR/etc/
|
||||||
|
fi
|
||||||
|
if [ -d /var/log/mariadb ] ; then
|
||||||
|
sudo cp -r /var/log/mariadb $LOG_DIR/
|
||||||
fi
|
fi
|
||||||
if [ -f /var/log/mysql.log ] ; then
|
|
||||||
sudo cp /var/log/mysql.log $LOG_DIR/
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# tempest logs
|
# tempest logs
|
||||||
|
Loading…
Reference in New Issue
Block a user