WEB开发网
开发学院数据库MySQL MySQL备份和同步时使用LVM 阅读

MySQL备份和同步时使用LVM

 2007-02-14 10:53:23 来源:WEB开发网   
核心提示: There are two types of snapshots - some of them are read-only while others can be read-write. read-only snapshots may sound good enough as you

There are two types of snapshots - some of them are read-only while others can be read-write. read-only snapshots may sound good enough as you're only going to read data anyway, but in reality read-write snapshots have number of benefits. First no extra handling is needed for journaling file sytems - you can simply do journal recovery on snapshot. With read-only snapshot you need to make sure filesystem synchronizes device before snapshot is taken so no journal replay is needed.

快照有2种方式 -- 一种是只读另一种是可读写。如果你只须拷贝数据,那么只读快照看起来不错,不过可读写快照则有好几个优点。首先是无需额外处理日至文件系统 -- 你可以快照上简单地实现日志恢复。只读快照则必须保证文件系统在开始快照之前就得和设备同步,因此需要日志重现。

The other benefit of read-write snapshot is you can actually start MySQL Server on it and perform recovery, check tables or do whatever else you might need to do to ensure your backup is consistent. Backing up database which was already corrupted is very nasty problem you want to avoid.

可读写快照的另一个好处是可以启动MySQL服务器,执行恢复、检察数据表或者其他任何要保证备份一致性所需的操作。必须避免备份已经损坏的数据库。

Let's now see what exactly you need to do to perform backup of MySQL Database (or create slave) using LVM2 on Linux.

现在让我们来看看Linux上用LVM2备份MySQL数据库(或者它的slave)所需执行的操作:

上一页  1 2 3 4 5 6 7  下一页

Tags:MySQL 备份 同步

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接