简体   繁体   English

如何从容器外部的 RMAN 备份恢复 docker 中的 oracle 数据库

[英]How to restore oracle database in docker from RMAN backup outside container

I was looking for a solution but unfortunately I couldn't find the right answer.我一直在寻找解决方案,但不幸的是我找不到正确的答案。 I have docker container with oracle database ( database-enterprise:12:2:0.1 ) and I have rman backup (archivelogs, controlfile, spfile) on Windows.我有 docker 容器和 oracle 数据库( database-enterprise:12:2:0.1 ),我在 ZAEA23489CE3AA9B6406EBB28E 上有 rman 备份(归档日志、控制文件、spfile)

How can I upload this backup into container and make recovery database or another good solution - run new database from this backup?如何将此备份上传到容器中并制作恢复数据库或其他好的解决方案 - 从此备份运行新数据库?

This is a pretty broad question and you haven't given us a lot of details, so I'll answer it in broad terms.这是一个相当宽泛的问题,你没有给我们很多细节,所以我将笼统地回答它。

See this duplicate question for copying files from host to docker container请参阅此重复问题以将文件从主机复制到 docker 容器

Now that you have your backup files on the server, there are several steps involved in RMAN recovery.既然您已经在服务器上拥有了备份文件,那么 RMAN 恢复涉及几个步骤。 I'll list them briefly here, but this guide covers them in more detail .我将在此处简要列出它们,但本指南将更详细地介绍它们

  1. Restore SPFILE (sets global system parameters including controlfile location)恢复 SPFILE(设置全局系统参数,包括控制文件位置)
  2. Restore CONTROLFILE (sets system configuration - where the datafiles are, etc. On a working database, you can backup the controlfile to trace to view the config details)恢复 CONTROLFILE(设置系统配置 - 数据文件所在的位置等。在工作数据库上,您可以备份控制文件以跟踪以查看配置详细信息)
  3. Restore database (using a backupset - basically just copies of the datafiles)恢复数据库(使用备份集 - 基本上只是数据文件的副本)
  4. Recover database (applies archived redo logs to bring the datafiles forward in time)恢复数据库(应用归档重做日志以及时将数据文件提前)
  5. Reset the logs (if you don't have enough redo logs to complete the recovery)重置日志(如果您没有足够的重做日志来完成恢复)
  6. Open the database打开数据库

For an exhaustive level of detail, Oracle has written an entire book of documentation about RMAN .对于详尽的详细信息, Oracle 编写了整本有关 RMAN 的文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM