Difference between revisions of "ContextRestore Bundle"

(Created page with '= Context Restore Documentation = == Introduction == This document contains descriptions about the context restore bundle. This bundle is a solution for restoring one single co...')
 
(Context Restore Documentation)
Line 7: Line 7:
 
complete Open-Xchange database. In a distributed setup, it is possible to use
 
complete Open-Xchange database. In a distributed setup, it is possible to use
 
several files containing the dumps of different databases. The tool described
 
several files containing the dumps of different databases. The tool described
within this document does fetch the needed informations out of these files.
+
within this document does fetch the needed information out of these files.
Architecture
+
 
 +
== Architecture ==
 +
 
 
The context restore bundle is designed as an admin bundle so it gets installed
 
The context restore bundle is designed as an admin bundle so it gets installed
 
into the OSGi environment of the OX admin daemon.
 
into the OSGi environment of the OX admin daemon.
Deliverables
+
 
 +
== Deliverables ==
 +
 
 
Package description
 
Package description
 
The package open-xchange-admin-plugin-contextrestore contains the bundle
 
The package open-xchange-admin-plugin-contextrestore contains the bundle
Line 20: Line 24:
  
 
== Limitations ==
 
== Limitations ==
 +
 
For the restore process, the tool requires some information to be available in the
 
For the restore process, the tool requires some information to be available in the
 
database. One is the availability of the old database pool id. The tool will dig out
 
database. One is the availability of the old database pool id. The tool will dig out
Line 26: Line 31:
 
does not exist any more, an error is thrown.
 
does not exist any more, an error is thrown.
 
The same applies to the filestore_id.
 
The same applies to the filestore_id.
Requirements
+
 
 +
== Requirements ==
 +
 
 
For correct operation, it is required that the mysql dumps for this tool represent
 
For correct operation, it is required that the mysql dumps for this tool represent
 
a consistent state of all databases the Open-Xchange server has under control.
 
a consistent state of all databases the Open-Xchange server has under control.
Line 32: Line 39:
 
filestore.
 
filestore.
  
== Installation ==
+
{{InstallPlugin|pluginname=open-xchange-admin-plugin-contextrestore|sopath=stable}}
  
 
After the package has been installed, a new shell script named restorecontext
 
After the package has been installed, a new shell script named restorecontext
Line 38: Line 45:
 
restarted to make the new functionality available. The functionality is accessible
 
restarted to make the new functionality available. The functionality is accessible
 
via RMI, CLT and SOAP.
 
via RMI, CLT and SOAP.
Usage
+
 
 +
== Usage ==
 +
 
 
A complete database backup has to be done before the new function can be
 
A complete database backup has to be done before the new function can be
 
used. The Tool described within this document requires a full SQL dump of the
 
used. The Tool described within this document requires a full SQL dump of the

Revision as of 07:42, 2 July 2010

Context Restore Documentation

Introduction

This document contains descriptions about the context restore bundle. This bundle is a solution for restoring one single context out of a mysql dump from a complete Open-Xchange database. In a distributed setup, it is possible to use several files containing the dumps of different databases. The tool described within this document does fetch the needed information out of these files.

Architecture

The context restore bundle is designed as an admin bundle so it gets installed into the OSGi environment of the OX admin daemon.

Deliverables

Package description The package open-xchange-admin-plugin-contextrestore contains the bundle itself and the corresponding configuration files. The bundle will get installed as a directory below /opt/open-xchange/bundles. The configuration file can be found in: /opt/open-xchange/etc/admindaemon/plugin/contextrestore.properties.

Limitations

For the restore process, the tool requires some information to be available in the database. One is the availability of the old database pool id. The tool will dig out the pool id the context used before from the mysql dump, and will try to get a connection to the corresponding database through this pool id. If the pool id does not exist any more, an error is thrown. The same applies to the filestore_id.

Requirements

For correct operation, it is required that the mysql dumps for this tool represent a consistent state of all databases the Open-Xchange server has under control. Furthermore this consistent state needs also to include the backup of the filestore.

Install on OX AppSuite

Debian GNU/Linux 10.0

Add the following entry to /etc/apt/sources.list.d/open-xchange.list if not already present:

deb https://software.open-xchange.com/products/stable/DebianBuster/ /
# if you have a valid maintenance subscription, please uncomment the 
# following and add the ldb account data to the url so that the most recent
# packages get installed
# deb https://[CUSTOMERID:PASSWORD]@software.open-xchange.com/products/stable/updates/DebianBuster/ /

and run

$ apt-get update
$ apt-get install open-xchange-admin-plugin-contextrestore

Debian GNU/Linux 11.0

Add the following entry to /etc/apt/sources.list.d/open-xchange.list if not already present:

deb https://software.open-xchange.com/products/stable/DebianBullseye/ /
# if you have a valid maintenance subscription, please uncomment the 
# following and add the ldb account data to the url so that the most recent
# packages get installed
# deb https://[CUSTOMERID:PASSWORD]@software.open-xchange.com/products/stable/updates/DebianBullseye/ /

and run

$ apt-get update
$ apt-get install open-xchange-admin-plugin-contextrestore


After the package has been installed, a new shell script named restorecontext is to be found under /opt/open-xchange/sbin. The admin daemon needs to be restarted to make the new functionality available. The functionality is accessible via RMI, CLT and SOAP.

Usage

A complete database backup has to be done before the new function can be used. The Tool described within this document requires a full SQL dump of the databases involved. This can be done by executing the command mysqldump -– all-databases -–single-transaction, on all database machines registered in Open-Xchange as well as the configuration Database. These two parameters are very important. The first one lets the dump contain every database on the specified database host, and the second is used for a consistent backup. Instead of –-all-databases you can also use –-database with the right database(s), if none of the switches are given as direct argument then mysql will left out essential data in the dump. For a full backup the switch --all-databases is recommended.

The usage of the command line tool is self-explanatory as it confirms to the standard unix behavior. --help will show a short help with the available parameters. The main arguments of the tool are different database dumps (from the configdb and the distributed user data databases). On success the tool returns the path to the filestore of the given context. The files below this path have to be restored afterwards in a separate process which is not part of the Open-Xchange system. An example of a restore would look like this: restorecontext -A <username> -P <password> -c 7777 -f <complete path to configdb dump>,<complete path to first user data database dump>[,<complete path to the n-th user data database dump>] file:///tmp/filestore2/7777_ctx_store Note that the parts in <> have to be replaced by the parameters for your setup