stoney cloud: Resetting your Test-Environment
From stoney cloud
Contents
Overview
This page describes how to easily reset your stoney cloud Test-Environment.
Prerequisites
After you've installed and configured your stoney cloud Test-Environment, but before you've added any profiles, you need to make a complete Backup of your LDAP directory:
/usr/sbin/makeOpenLDAPmasterBackup.sh
The output will look something like:
Backup directory /var/backup/ldap/vm-test-01.int.stoney-cloud.org exists ################################################################################################### Removing backups older than 15 days ... ################################################################################################### find /var/backup/ldap/vm-test-01.int.stoney-cloud.org -type f -ctime +15 -exec rm {} \; >/dev/null Backup Started ################################################################################################### Executing touch /var/backup/ldap/vm-test-01.int.stoney-cloud.org/OpenLDAPmasterBackup.ldif.2015-02-12 ################################################################################################### Executing chmod 600 /var/backup/ldap/vm-test-01.int.stoney-cloud.org/OpenLDAPmasterBackup.ldif.2015-02-12 ################################################################################################### Executing /usr/sbin/slapcat -l /var/backup/ldap/vm-test-01.int.stoney-cloud.org/OpenLDAPmasterBackup.ldif.2015-02-12 ################################################################################################### Backup Finished ################################################################################################### You can look at the backup file with: vi /var/backup/ldap/vm-test-01.int.stoney-cloud.org/OpenLDAPmasterBackup.ldif.2015-02-12
Copy the newly created OpenLDAPmasterBackup.ldif.2015-02-12 to another location for later use:
mkdir -p /root/stoney-cloud-reset cp /var/backup/ldap/vm-test-01.int.stoney-cloud.org/OpenLDAPmasterBackup.ldif.2015-02-12 /root/stoney-cloud-reset/.
Resetting your Test-Environment
Stop the Web Server
Stop the Web server on both Master-Nodes:
/etc/init.d/apache2 stop
Stop the LDAP Server
Stop the LDAP server on both Master-Nodes:
/etc/init.d/slapd stop
Remove all unnecessary Files
Remove all the unnecessary files on the Primary-Master-Node:
rm /var/virtualization/iso-choosable/*.iso rm /var/virtualization/iso/*.iso rm /var/virtualization/vm-templates/*/*.qcow2 rm /var/virtualization/vm-dynamic/*/*.qcow2 rm /var/virtualization/vm-persistent/*/*.qcow2