备份和恢复¶
OTRS 具有备份和还原的内置脚本。 使用 -h
选项执行此脚本以获取更多信息。
备份¶
注解
要创建备份,otrs
用户需要有目标目录的写入权限。
otrs> /opt/otrs/scripts/backup.pl -h
脚本的输出结果:
Backup an OTRS system.
Usage:
backup.pl -d /data_backup_dir [-c gzip|bzip2] [-r DAYS] [-t fullbackup|nofullbackup|dbonly]
Options:
-d - Directory where the backup files should place to.
[-c] - Select the compression method (gzip|bzip2). Default: gzip.
[-r DAYS] - Remove backups which are more than DAYS days old.
[-t] - Specify which data will be saved (fullbackup|nofullbackup|dbonly). Default: fullbackup.
[-h] - Display help for this command.
Help:
Using -t fullbackup saves the database and the whole OTRS home directory (except /var/tmp and cache directories).
Using -t nofullbackup saves only the database, /Kernel/Config* and /var directories.
With -t dbonly only the database will be saved.
Output:
Config.tar.gz - Backup of /Kernel/Config* configuration files.
Application.tar.gz - Backup of application file system (in case of full backup).
VarDir.tar.gz - Backup of /var directory (in case of no full backup).
DataDir.tar.gz - Backup of article files.
DatabaseBackup.sql.gz - Database dump.
恢复¶
otrs> /opt/otrs/scripts/restore.pl -h
脚本的输出结果:
Restore an OTRS system from backup.
Usage:
restore.pl -b /data_backup/<TIME>/ -d /opt/otrs/
Options:
-b - Directory of the backup files.
-d - Target OTRS home directory.
[-h] - Display help for this command.