复制作为备份解决方案

复制 可用于支持 备份 策略。

仅使用复制是不够的备份。它有助于保护主服务器上的硬件故障,但无法防止数据丢失。一个意外或恶意的DROP DATABASETRUNCATE TABLE语句也将被复制到副本上。需要注意防止主服务器和副本之间的数据不同步。

The terms master and slave have historically been used in replication, and MariaDB has begun the process of adding primary and replica synonyms. The old terms will continue to be used to maintain backward compatibility - see MDEV-18777 to follow progress on this effort.

最常用的方式是使用复制来支持备份:

  • 主服务器复制到副本
  • 然后在副本上运行备份,不会对主服务器产生任何影响。

备份对服务器可能会产生重大影响,高可用性的主服务器可能无法停止、锁定或仅仅处理备份的额外负载。从副本运行备份的优点是可以关闭或锁定副本,并在不影响主服务器的情况下执行备份。

请注意,当从副本服务器备份时,重要的是确保服务器保持数据同步。例如,对于相同语句可能导致副本和主服务器上不同数据的情况,请参见复制和外键

另请参阅

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.