Why mysqldump instead of Percona's xtrabackup/innobackupex? I was under the impression that the latter had a lot of advantages and have been considering switching, wondering if there is a good reason not to.
We take logical backups, not physical, and mysqldump is the best option for that. Having logical backups means we can do logical diffs as well (see https://youtu.be/Fe2oLZ4CWD4?t=951 ), and we've added table checksum support to mysqldump in our branch of MySQL ( https://github.com/facebook/mysql-5.6/commit/54acbbf915935a0... )
Continuous MySQL backup validation: Restoring backups
21–29 of 29 posts
Re: Continuous MySQL backup validation: Restoring backups
#22Interesting. I assumed FB would have hot replicas (kept up to date with live master-slave replication at all times) - ready to go any time a main database fails. Cascade that to another layer of slaves and there's no need to restore anything ever.
Facebook has hot replicas in every region. But replicas and backups serve completely different purposes. Replicas are for failover and read scalability. In terms of failover, when a master dies unexpectedly Facebook's automation fails over to promote a replica to be the new master in under 30 seconds and with no loss of committed data. Backups are for when something goes horribly wrong -- i.e. due to human error -- a…
Re: Continuous MySQL backup validation: Restoring backups
#23> We do these by taking another full dump and only storing the difference between it and the last full backup that was taken. Do you diff against the same base, or create an incremental chain? How many diffs do you take in between recapturing a full image? At $DAYJOB we always take full backups into a fast in-house deduplicating store. > Periodically, each peon syncs with the ORC DB to look for new jobs assigned to i…
> Do you diff against the same base, or create an incremental chain? How many diffs do you take in between recapturing a full image? At $DAYJOB we always take full backups into a fast in-house deduplicating store. We always diff against the same base and have 5 days in between subsequent full dumps. The number of days just comes from a trade off between space occupied by the backups and time it takes to generate them…
Re: Continuous MySQL backup validation: Restoring backups
#24Earlier quoted context omitted.
Is the FB branch version of mysqldump still single threaded? How do you cope with that? I currently "fake it", using "START TRANSACTION WITH CONSISTENT SNAPSHOT", with multiple mysqldump processes running, where I can't get mydumper deployed.
We run a single mysqldump with --single-transaction for each database on the server, nothing special.
Re: Continuous MySQL backup validation: Restoring backups
#25Earlier quoted context omitted.
Facebook has hot replicas in every region. But replicas and backups serve completely different purposes. Replicas are for failover and read scalability. In terms of failover, when a master dies unexpectedly Facebook's automation fails over to promote a replica to be the new master in under 30 seconds and with no loss of committed data. Backups are for when something goes horribly wrong -- i.e. due to human error -- a…
I suppose at Facebook scale it might be infeasible, but couldn't you get the same effect by archiving log segments and a periodic binary full backup? This is precisely what I do with my PostgreSQL databases (though with some friendly automation with pg barman), I assume you could do the same with some tooling around MySQL's binlog facilities.
Re: Continuous MySQL backup validation: Restoring backups
#26Earlier quoted context omitted.
We take logical backups, not physical, and mysqldump is the best option for that. Having logical backups means we can do logical diffs as well (see https://youtu.be/Fe2oLZ4CWD4?t=951 ), and we've added table checksum support to mysqldump in our branch of MySQL ( https://github.com/facebook/mysql-5.6/commit/54acbbf915935a0... )
xtrabackup does differential backups as well...is there another advantage to doing logical backups? are the diffs significantly smaller?
Re: Continuous MySQL backup validation: Restoring backups
#27Earlier quoted context omitted.
We run a single mysqldump with --single-transaction for each database on the server, nothing special.
Thanks, how big is a single instance? All out to a single file?
Remember we're backing up each database separately though, not the entire MySQL instance at once. Each database's backup is in a separate file.
Re: Continuous MySQL backup validation: Restoring backups
#28Earlier quoted context omitted.
We take logical backups, not physical, and mysqldump is the best option for that. Having logical backups means we can do logical diffs as well (see https://youtu.be/Fe2oLZ4CWD4?t=951 ), and we've added table checksum support to mysqldump in our branch of MySQL ( https://github.com/facebook/mysql-5.6/commit/54acbbf915935a0... )
xtrabackup does differential backups as well...is there another advantage to doing logical backups? are the diffs significantly smaller?
Re: Continuous MySQL backup validation: Restoring backups
#29Earlier quoted context omitted.
Thanks, how big is a single instance? All out to a single file?
Instance size varies a lot because we've got a lot of different MySQL workloads, some with very different configurations. Remember we're backing up each database separately though, not the entire MySQL instance at once. Each database's backup is in a separate file.