Difference between revisions of "stoney cloud: Resetting your Test-Environment"

From stoney cloud
Jump to: navigation, search
[checked revision][checked revision]
(Created page with "= Overview = This page describes how to easily reset your stoney cloud Test-Environment. = Prerequisites = After you've installed and configured your stoney cloud Test-Enviro...")
 
(Prerequisites)
Line 5: Line 5:
 
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:
 
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:
 
<source lang="bash">
 
<source lang="bash">
makeOpenLDAPmasterBackup.sh
+
/usr/sbin/makeOpenLDAPmasterBackup.sh
 
</source>
 
</source>
  
 +
The output will look something like:
 +
<source lang="bash">
 +
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
 +
</source>
 +
 +
Copy the newly created OpenLDAPmasterBackup.ldif.2015-02-12 to another location for later use:
 +
<source lang="bash">
 +
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/.
 +
</source>
 +
 +
= Resetting your Test-Environment =
 +
== Stop the Web Server ==
 +
Stop the Web server on both Master-Nodes:
 +
<source lang="bash">
 +
/etc/init.d/apache2 stop
 +
</source>
 +
 +
== Stop the LDAP Server ==
 +
Stop the LDAP server on both Master-Nodes:
 +
<source lang="bash">
 +
/etc/init.d/slapd stop
 +
</source>
 +
 +
== Remove all unnecessary Files ==
 +
Remove all the unnecessary files on the Primary-Master-Node:
 +
<source lang="bash">
 +
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
 +
</source>
  
 
[[Category: Installation]]
 
[[Category: Installation]]
 
[[Category: stoney cloud]]
 
[[Category: stoney cloud]]

Revision as of 13:07, 12 February 2015

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