Open-Xchange backup: Difference between revisions
No edit summary |
|||
(11 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
= Backup = | = Backup = | ||
This article describes | This article describes the components needed to back up Open-Xchange and its data. | ||
== Configuration == | == Configuration == | ||
A backup of the configuration files is recommended once after installation and every change (also before and after any software update). | A backup of the configuration files is recommended once after installation and after every change (also before and after any software update). | ||
All configuration is in the directory | All configuration is in the directory | ||
Line 10: | Line 10: | ||
==User Data== | ==User Data== | ||
User Data is in the Mysql Database as well as in the location of the registered filestores as | User Data is in the Mysql Database as well as in the location of the registered filestores as normal files in the filesystem. | ||
It is important that filestore and database are backed up at the same time. This is | It is important that filestore and database are backed up at the same time. This is | ||
because the meta data for the files in the filestore directories is in the database. | because the meta data for the files in the filestore directories is in the database. | ||
The best way to achieve this, is using snapshots or a similar | The best way to achieve this, is using snapshots or a similar mechanism. | ||
===Filestore=== | ===Filestore=== | ||
Line 23: | Line 23: | ||
===Database=== | ===Database=== | ||
For the Database, the standard mysql tools can be used for a backup. | For the Database, the standard mysql tools can be used for a backup. | ||
If mysqldump is used to | If mysqldump is used to back up the database, following parameters are recommended: | ||
mysqldump - | mysqldump --hex-blob --all-databases --single-transaction > database_dumpfile.mysql | ||
=Restore= | =Restore= | ||
In case of data restore, it is | It is recommended to delete all existing data beneath the filestore entry point, e.g. /var/opt/filestore/* to avoid inconsistencies before restoring a backup to the filestore. | ||
up at the same time to avoid | |||
The database dumpfile is restored by the following command. Existing databases should be dropped before restroing the backup file: | |||
mysql -uroot -p < database_dumpfile.mysql | |||
Being able to use the user permissions right after importing the "user" table the permissions have to be flushed: | |||
mysql -uroot -p -e "FLUSH PRIVILEGES;" | |||
In case of data restore, it is imperative to use database and filestore data that have been backed | |||
up at the same time to avoid inconsistencies. After a restore the consistency tool has to run for a | |||
basic check: | basic check: | ||
/opt/open-xchange/sbin/checkconsistency | /opt/open-xchange/sbin/checkconsistency | ||
==Single context restore== | ==Single context restore== | ||
It is possible to only restore a single context from within a complete mysql database dump. This is described on the following page: [[ContextRestore_Bundle]] | |||
Latest revision as of 06:16, 10 September 2013
Backup
This article describes the components needed to back up Open-Xchange and its data.
Configuration
A backup of the configuration files is recommended once after installation and after every change (also before and after any software update).
All configuration is in the directory
/opt/open-xchange/
User Data
User Data is in the Mysql Database as well as in the location of the registered filestores as normal files in the filesystem.
It is important that filestore and database are backed up at the same time. This is because the meta data for the files in the filestore directories is in the database. The best way to achieve this, is using snapshots or a similar mechanism.
Filestore
For the Filestore, standard tools can be used to perform the backup. Following command gives an overview of all filestore directories.
/opt/open-xchange/sbin/listfilestore
Database
For the Database, the standard mysql tools can be used for a backup. If mysqldump is used to back up the database, following parameters are recommended:
mysqldump --hex-blob --all-databases --single-transaction > database_dumpfile.mysql
Restore
It is recommended to delete all existing data beneath the filestore entry point, e.g. /var/opt/filestore/* to avoid inconsistencies before restoring a backup to the filestore.
The database dumpfile is restored by the following command. Existing databases should be dropped before restroing the backup file:
mysql -uroot -p < database_dumpfile.mysql
Being able to use the user permissions right after importing the "user" table the permissions have to be flushed:
mysql -uroot -p -e "FLUSH PRIVILEGES;"
In case of data restore, it is imperative to use database and filestore data that have been backed up at the same time to avoid inconsistencies. After a restore the consistency tool has to run for a basic check:
/opt/open-xchange/sbin/checkconsistency
Single context restore
It is possible to only restore a single context from within a complete mysql database dump. This is described on the following page: ContextRestore_Bundle