Making a snapshot of a running ot-system
========================================

Date of the SNAPSHOT file: 07.06.2001

This document describes how to make "copy" of a running open theory web
server e.g. for testing purposes.

You can create a test system by making a snapshot of the productive system
on the same server. The risk to crash the server by translating texts is
negligible. This is done like a fresh installation (except installing
LAMP-system, you already have it). Refer to INSTALL document and do the
following steps (or the admin for you):

- make an archive of the tree part beginning at /anypath/htdocs:

	cd /anypath/htdocs
	tar cvzf ottest.tgz ./*

- make an archive of the entire database, say from /var/mysql/otdb
  (it is a clever idea to do this daily e.g. driven by a cron job)

	cd /var/mysql/otdb
	tar cvfz otdb.tgz ./*

- create a new base directory for ottest, say /anypath/ottest, an extract
  the tree-archive:

	mkdir /anypath/ottest
	cd /anypath/ottest
	tar xzf ottest.tgz

- create a new mysql database as described in mysql documentations, say
  ottest. You will find a new directory /var/mysql/ottest. Then extract the
  db-archive:

	cd /var/mysql/ottest
	tar xzf otdb.tgz

- reload the database daemon:

	mysqladmin reload

- open http.conf file from apache and include a new directory definition for
  the authentication like that:

	PerlSetEnv PERL5LIB /anypath/ottest/otperl

	<DIRECTORY /anypath/ottest/ot/auth>
		AuthName opentheory
		AuthType Basic
		require valid-user
		PerlAuthenHandler ot_aut
	</DIRECTORY)

  ... and an alias definition to root dir of virtual web server:

	Alias /ottest/ /anypath/ottest/ot/

  OR: you use an own apache session whith an own http.conf-file.

- restart apache daemon:

	/sbin/init.d/apache restart

- edit the file /anypath/ottest/const.inc and set the new db-name:

	$sqldb = 'ottest';		# mysql database name

Start the web browser and test - that's it.
	
Note: You can get inconsistencies due to time lag between creation of both
archives described before. So, it is a good idea to do this job at a time
with low usage.
