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.

Was it helpful?

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top