How to restore Crowbar backup on the admin node
This document (7022979) is provided subject to the disclaimer at the end of this document.
Environment
Situation
Resolution
snapper create -d "cleaned admin node"
cp -a /var/lib/crowbar/cache/etc/resolv.conf /etc/resolv.conf
/etc/bind/named.conf
cat >/etc/resolv.conf <<EOF
search examplecloud.suse.com
nameserver 127.0.0.1
nameserver 192.168.124.10
EOF
for service in crowbar crowbar-jobs crowbar-init \
tftp chef-{server,solr,expander,client} couchdb \
apache2 named dhcpd xinetd rabbitmq-server postgresql dnsmasq; \
do \
systemctl stop $service; \
done
killall epmd # part of rabbitmq
killall looper_chef_client.sh
zypper rm \
`rpm -qa|grep -e crowbar -e chef -e cloud -e apache2` \
couchdb createrepo erlang rabbitmq-server sleshammer yum-common \
bind bind-chrootenv dhcp-server tftp
rm -rf /opt/dell/* \
/etc/{bind,chef,crowbar,crowbar.install.key,dhcp3,xinetd.d/tftp} \
/etc/sysconfig/{dhcpd,named/*,rabbitmq-server} \
/var/lib/{chef,couchdb,crowbar,dhcp,rabbitmq} \
/var/run/{chef,crowbar,named/*,rabbitmq} \
/var/log/{apache2,chef,couchdb,crowbar,nodes,rabbitmq} \
/var/cache/chef \
/var/chef \
/var/lib/pgsql/* \
/srv/tftpboot/{discovery/pxelinux.cfg/*,nodes,validation.pem}
killall epmd
snapper create -d "cleaned admin node"
7. Ensure admin node is resolvable,
nslookup
and ping
works
#e.g. start dnsmasq and add ip/name to /etc/hosts as needed
systemctl start dnsmasq.service
zypper in -t pattern base cloud_admin
9. apply PTF fix for hostname check against /etc/hostname instead "hostname -f
"
if still neededrpm -Fhv /ptf/*.rpm
10. Prepare backup in place
mkdir restore
cd restore
tar -xvf ../backup-restore.tar.gz
cp crowbar/configs/crowbar/network.json /etc/crowbar/network.json
cp crowbar/configs/hostname /etc/hostname
10.3 If using remote SMT add ip/name to the backup tar (not needed if reachable
via separate bastion network)
echo "10.10.10.10 smt-server.suseexample.com smt-server">> crowbar/configs/hosts
echo "10.10.10.0 192.170.124.1" >> /etc/sysconfig/network/routes
tar -czvf restore.tar.gz crowbar/ knife/ meta.yml
systemctl start crowbar-init
crowbarctl database create
snapper create -d "clean admin node prior uploading/restore backup"
crowbarctl backup upload restore.tar.gz --debug --anonymous
crowbarctl backup list
crowbarctl backup restore <name-from-list>
16 monitor progress
tail -f /var/log/apache2/*log /var/log/crowbar/*
for service in crowbar crowbar-jobs \
tftp chef-{server,solr,expander,client} couchdb \
apache2 named dhcpd xinetd rabbitmq-server postgresql dnsmasq; \
do \
systemctl status $service; \
done
Cause
Additional Information
/usr/bin/crowbarctl backup create "$(date '+%Y%m%d-%H%M%S')"
for the barclamps has a bad status:
mkdir check
cd check
tar -xzvf <path to backup tar>
grep "crowbar-" knife/roles/*.json|grep -i failed
Note: When restoring a crowbar backup current uploaded backups get removed, please download them before.
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:7022979
- Creation Date: 17-May-2018
- Modified Date:03-Mar-2020
-
- SUSE Open Stack Cloud
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com