Options for rebuilding a database

11 views
Skip to first unread message

NoRearView

unread,
Jun 14, 2016, 6:52:03 PM6/14/16
to Percona Discussion
Hello!

I took over a set up that currently has the production and staging databases run on the same Linux machine. The staging is used for only testing situations. There is a script that runs every night that does the following:

1. Backs up the production database.
2. Drops the staging database
3. Creates the staging database
4. Rebuilds the staging database using the backup of the production database.

This seems horribly inefficient and an unnecessary strain on the machine that handles our production. My end goal is to move the staging database off the production environment and on to its own machine. However, that will not be doable for awhile.

Are there any other options for me to get this database rebuilt every night? Can I just do a merge of some sort to only update the changes that have been made throughout the day?

Thanks!

Jaime Crespo

unread,
Jun 15, 2016, 4:49:08 AM6/15/16
to percona-d...@googlegroups.com
You should check snapshoting [0] (by virtual machines, by LVM, or any other method) and/or binary log applying [1]. Snapshots are not "free"- requires some performance penalties and some free space. Maybe you could also use Percona Xtrabackup's differential backups [2] in a clever way, too.

[0] <https://en.wikipedia.org/wiki/Snapshot_%28computer_storage%29>
[1] <http://dev.mysql.com/doc/refman/5.7/en/point-in-time-recovery.html>
[2] <https://www.percona.com/doc/percona-xtrabackup/2.4/xtrabackup_bin/incremental_backups.html>

--
You received this message because you are subscribed to the Google Groups "Percona Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to percona-discuss...@googlegroups.com.
To post to this group, send email to percona-d...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Jaime Crespo
Reply all
Reply to author
Forward
0 new messages