Skip to content

Instantly share code, notes, and snippets.

View piotr-gbyliczek's full-sized avatar

Piotr Gbyliczek piotr-gbyliczek

View GitHub Profile
# stop services
systemctl stop rh-mongodb34-mongod httpd dynflowd postgresql puppet puppetserver qdrouterd qpidd smart_proxy_dynflow_core tomcat foreman* pulp*
# Remove foreman
yum remove foreman foreman-installer foreman-proxy pulp*
rm -rf /var/lib/foreman* /usr/share/foreman /usr/share/foreman-proxy/logs /var/lib/qpidd
rm -rf /etc/*foreman* /var/lib/tomcat/* /var/lib/pulp/* /opt/puppetlabs /opt/theforeman /opt/rh /var/lib/pgsql/data /var/cache/foreman-proxy /var/cache/pulp
rm -rf /etc/httpd/conf.d/*foreman* /etc/httpd/conf.d/passenger.conf /etc/candlepin /etc/pulp /etc/puppetlabs /etc/qpid*
rm -rf /etc/smart_proxy_dynflow_core /etc/opt/rh /var/opt/theforeman /var/www/html/pub/katello* /usr/lib/python2.7/site-packages/katello_certs_tools
rm -rf /etc/opt/theforeman /etc/hammer /etc/pki/katello /etc/pki/katello-certs-tools /etc/sudoers.d/foreman-proxy
@piotr-gbyliczek
piotr-gbyliczek / xtrabackup_runner.sh
Last active October 27, 2020 18:56 — forked from sveesible/xtrabackup_runner.sh
A fancier mysql backup script for Xtrabackup:
#!/bin/bash
# Script to create full and incremental backups (for all databases on server) using innobackupex from Percona.
# http://www.percona.com/doc/percona-xtrabackup/innobackupex/innobackupex_script.html
#
# (C)2017 Piotr Gbyliczek (p.gbyliczek at node4.co.uk)
# - changed to use build in compression mechanism
# - corrected restore process (restore from mixed compressed and uncompressed incrementals is supported as well)
# - tidied up script a bit and added new checks
# - removed unneeded xbstream usage (useful only for network transfers, not compatible with incremental backups)
# A sample configuration file to setup ROBO, based on https://github.com/gluster/gdeploy/blob/master/examples/hc.conf
[hosts]
host1
host2
host3
# Do a sanity check before proceding
[script1]
action=execute