Changeset View
Changeset View
Standalone View
Standalone View
src/docs/user/cluster/cluster_databases.diviner
Show First 20 Lines • Show All 290 Lines • ▼ Show 20 Lines | |||||
data will be gone forever. Normally, the only way to recover this data is from | data will be gone forever. Normally, the only way to recover this data is from | ||||
backup snapshots. | backup snapshots. | ||||
Although you should still have a backup process, your backup process can | Although you should still have a backup process, your backup process can | ||||
safely pull dumps from a replica instead of the master. This operation can | safely pull dumps from a replica instead of the master. This operation can | ||||
be slow, so offloading it to a replica can make the performance of the master | be slow, so offloading it to a replica can make the performance of the master | ||||
more consistent. | more consistent. | ||||
To dump from a replica, wait for this TODO to be resolved and then do whatever | To dump from a replica, you can use `bin/storage dump --host <host>` to | ||||
it says to do: | control which host the command connects to. (You may still want to execute | ||||
this command //from// that host, to avoid sending the whole dump over the | |||||
TODO: Make `bin/storage dump` replica-aware. See T10758. | network). | ||||
With the `--for-replica` flag, the `bin/storage dump` command creates dumps | |||||
with `--dump-slave`, which includes a `CHANGE MASTER` statement in the output. | |||||
This may be helpful when initially setting up new replicas, as it can make it | |||||
easier to change the binlog coordinates to the correct position for the dump. | |||||
With recent versions of MySQL, it is also possible to configure a //delayed// | With recent versions of MySQL, it is also possible to configure a //delayed// | ||||
replica which intentionally lags behind the master (say, by 12 hours). In the | replica which intentionally lags behind the master (say, by 12 hours). In the | ||||
event of a bad mutation, this could give you a larger window of time to | event of a bad mutation, this could give you a larger window of time to | ||||
recognize the issue and recover the lost data from the delayed replica (which | recognize the issue and recover the lost data from the delayed replica (which | ||||
might be quick) without needing to restore backups (which might be very slow). | might be quick) without needing to restore backups (which might be very slow). | ||||
Delayed replication is outside the scope of this document, but may be worth | Delayed replication is outside the scope of this document, but may be worth | ||||
Show All 12 Lines |