Вопрос

I am trying to backup my database over the network with mysqldump and rsync. 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:

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

Also see here.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top