使用engine-backup程序

简要说明.
数据是一定不能丢的,OVIRT开发此脚本程序帮助您实现这一目标。

engine-backup是将备份和恢复统一到一起的程序,根据用户的参数而做区别。

先来查看engine-backup的使用帮助:

  1. engine-backup --help
  2. engine-backup: backup and restore ovirt-engine environment
  3. USAGE:
  4. /usr/bin/engine-backup [--mode=MODE] [--scope=SCOPE] [--file=FILE] [--log=FILE]
  5. MODE is one of the following:
  6. backup backup system into FILE
  7. restore restore system from FILE
  8. SCOPE is one of the following:
  9. all complete backup/restore (default)
  10. db database only
  11. --file=FILE file to use during backup or restore
  12. --log=FILE log file to use
  13. --change-db-credentials activate the following options, to restore
  14. the database to a different location etc.
  15. If used, existing credentials are ignored.
  16. --db-host=host set database host
  17. --db-port=port set database port
  18. --db-user=user set database user
  19. --db-passfile=file set database password - read from file
  20. --db-password=pass set database password
  21. --db-password set database password - interactively
  22. --db-name=name set database name
  23. --db-secured set a secured connection
  24. --db-secured-validation validate host

以下是使用全部参数的例子:

  1. engine-backup --mode=backup --scope=all --file=backup --log=backup.log --change-db-credentials --db-host=localhost --db-port=5432 --db-user=engine --db-password=ffdC9lhX --db-name=engine
  2. Backing up...
  3. Done.

将backup这个文件,放到您的备份环境中,最好是远程的。

Note

backup是经过tar,bzip2打包的,所以您打算手动查看请使用如下命令行:

  1. tar -jxvf backup