简体   繁体   中英

Point-in-time recovery Google Cloud SQL can't find a successful backup

We're running a Google Cloud SQL instance and I accidentally re-migrated a database over the top of the live database 14 days after it was initially migrated using the same mysqldump file - essentially rolling it back 14 days!

So I'm piecing data in the tables back together as new entries are using increment IDs previously used [thats not a problem] but I need to spin up a clone of the database from the moment just before I dropped and loaded the database.

I've got the point-in-time I need to use using:

mysqlbinlog --read-from-remote-server -v -uusername -ppassword mysql-bin.000001 -h 000.000.000.000 -P 3306 --start-datetime="2016-09-20 14:45:55" --stop-datetime="2016-09-20 14:47:00"

But when I put in the Binary log file name mysql-bin.000001 and the Recovery position 70869547 (found from scanning through the mysqlbinlog result) it responses with:

"A successful backup for carrying out the operation was not found."

It prompts to wait for the next daily backup, but the last backup was just 3 hours ago and I tried the same yesterday...

Any thoughts on why this would happen?

Ok, I think its simply that I'm trying to recover the data back to the 20th and the oldest backup is the 21st! Google only keeps 7 days worth of backups. But I hope that the method above helps someone find their backup point quicker in future.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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