简体   繁体   English

是否可以进行类似于MySQL的DB2表文件备份/恢复?

[英]Is it possible to do a DB2 table file backup/restore similar to MySQL?

We currently use a Dell Equalogic SAN to snapshot our MySQL databases and copy them between our various development and integration environments. 当前,我们使用Dell Equalogic SAN来快照我们的MySQL数据库并在我们的各种开发和集成环境之间复制它们。 This allows us to work directly with large volumes of production data in a testing environment. 这使我们可以在测试环境中直接处理大量生产数据。 The SAN makes these volumes instantly available for use (and avoids the need to copy large amounts of data). SAN使这些卷立即可用(并避免了复制大量数据的需要)。 The process is roughly : 该过程大致如下:

  • Stop MySQL on source and destination volumes 在源卷和目标卷上停止MySQL
  • Snapshot source volume using Dell Equalogic 使用Dell Equalogic的快照源卷
  • Clone source snapshot to target volume 将源快照克隆到目标卷
  • Mount target volume to target /var/lib/mysql 将目标卷挂载到目标/ var / lib / mysql
  • Start MySQL on both 两者都启动MySQL

We now need to introduce a DB2 instance into all of our environments and are trying to figure out if we can do something similar with DB2. 现在,我们需要在所有环境中引入一个DB2实例,并试图找出是否可以对DB2做类似的事情。 The question is: 问题是:

  • Is this possible in DB2? 在DB2中有可能吗?
  • What is the key directory or directories that we would need to clone and mount? 我们需要克隆和挂载的主要目录是什么?
  • Is there anything else that we might need to take into account? 还有什么我们可能需要考虑的吗?

Remember, the SAN is used because it allows us to snapshot and clone volumes > 150 gb and make them instantly available in any environment. 请记住,使用SAN是因为它使我们可以快照和克隆> 150 gb的卷,并使它们在任何环境中均可立即使用。

DB2 databases can be quickly cloned through SAN snapshot backup and split mirror techniques. 可以通过SAN快照备份和拆分镜像技术快速克隆 DB2数据库。 The SET WRITE SUSPEND ON DATABASE command offers a simple, powerful switch that pauses all disk writes as long as necessary for the SAN snapshot to complete. SET WRITE SUSPEND ON DATABASE命令提供了一个简单而强大的开关,可在SAN快照完成之前暂停所有磁盘写入。 Depending on the differences between the source and target database server, you may need to run utilities such as db2inidb or db2relocatedb at specific points in the process. 根据源数据库服务器和目标数据库服务器之间的差异,您可能需要在过程中的特定点运行db2inidbdb2relocatedb实用程序。

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

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