Re: Database restore
Reindl Harald <[email protected]>
| Newsgroups | gmane.mail.imap.dbmail |
|---|---|
| Organization | the lounge interactive design |
| Message-ID | <[email protected]> |
Am 05.02.2015 um 15:00 schrieb Curtis Maurand: > Thanks, I'll give that a shot while i look at replicatuon which I've > never been able to make work there is nothing difficult and is configured within 5 minutes just enable binlog on the current server, rsync the datadir to the new slave and start replication there with just type "CHANGE MASTER TO MASTER_HOST='master.example.com', MASTER_USER='replication', MASTER_PASSWORD='***', MASTER_PORT=3306, MASTER_CONNECT_RETRY=10; START SLAVE;" while replace the MASTER_USER='replication' matching your environment the script below makes a clean binary identical copy on the master with minimized downtime, after that you rsync /Volumes/dune/mysql_backup/ to the new slave _________________________________________________________ config on the master may look like this server-id = 1 log-bin = /data/mysql_data/bin.log log-bin-index = /data/mysql_data/bin.index expire_logs_days = 1 max_binlog_size = 128M binlog-format = ROW binlog-ignore-db = syslog replicate-ignore-db = syslog binlog_stmt_cache_size = 512K binlog_cache_size = 512K sync_binlog = 0 _________________________________________________________ rsync --times --perms --owner --group --recursive --delete-after /data/mysql_data/ /data/mysql_backup/ /usr/local/scripts/dbmail-stop-all.sh cd /data/mysql_data/ rm -f /data/mysql_data/bin* rsync --progress --times --perms --owner --group --recursive --delete-after /data/mysql_data/ /data/mysql_backup/ /usr/local/scripts/dbmail-start-all.sh _________________________________________________________ _______________________________________________ DBmail mailing list [email protected] http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
signature.asc
(application/pgp-signature, 181 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlTTeh8ACgkQhmBjz394AnkiZwCePYLsVAdAS11iFu9OjVARkW+x lL4An36jp92+ekKkrzsEBPm5RG5FRfL4 =4FAd -----END PGP SIGNATURE-----