Chapter 22. Backing up the system

Table of Contents

Backup
Restore

Abstract

This chapter describes the backup and restore of the OTRS data.

Backup

There are two types of data to backup; the application (e.g. the files in /opt/otrs and the data stored in the database.

To simplify backups, the script scripts/backup.pl is included in every OTRS installation. It is able to backup all important data.

linux:/opt/otrs# cd scripts/
linux:/opt/otrs/scripts# ./backup.pl --help
backup.pl <Revision 1.1> - backup script
Copyright (c) 2001-2005 Martin Edenhofer <martin@otrs.org>
usage: backup.pl -d /data_backup/ [-c bzip2|gzip] [-r 30] [-t nofullbackup]
linux:/opt/otrs/scripts#

Execute the following command to create a backup:

linux:/opt/otrs/scripts# ./backup.pl -d /backup/
Backup /backup//2005-09-12_14-28/Config.tar.gz ... done
Backup /backup//2005-09-12_14-28/Application.tar.gz ... done
Dump MySQL rdbms ... done
Compress SQL-file... done
linux:/opt/otrs/scripts#

All data was stored in the directory /backup/2005-09-12_14-28/. additionally the data was saved into a .tar.gz file.

linux:/opt/otrs/scripts# ls /backup/2005-09-12_14-28/
Application.tar.gz  Config.tar.gz  DatabaseBackup.sql.gz
linux:/opt/otrs/scripts#