简体   繁体   English

使用mysqldump和rsync备份

[英]Backup with mysqldump & rsync

I am trying to backup my database over the network with mysqldump and rsync . 我正在尝试使用mysqldumprsync通过网络备份我的数据库。 I wanted to ask if there is any way to know if the database has been modified since the last time I did my old dump, before doing a new dump or update the old one. 我想询问是否有任何方法可以知道自上次执行旧转储以来数据库是否已被修改, 然后再进行新转储或更新旧转储。

Thank you. 谢谢。

You could access each database that might need to be dumped and ask for the last modified time. 您可以访问可能需要转储的每个数据库并请求上次修改时间。 It's available through the information_schema database: 它可以通过information_schema数据库获得:

SELECT UPDATE_TIME
FROM   information_schema.tables
WHERE  TABLE_SCHEMA = 'dbname'
   AND TABLE_NAME = 'tabname'

Also see here . 另见这里

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

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