Question

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.

Était-ce utile?

La solution

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top