Syncing All MySQL Databases Between two Cpanel Servers

After you do a WHM multi-site transfer, you may want to resync all the MySQL databases before doing a DNS change. Here’s a quick and easy way to sync each Cpanel user’s databases on the new Cpanel server. After manually setting up a remote mysql root user on the original server (and opening a firewall port if needed), run this command on the NEW server.

cat /var/cpanel/databases/dbindex.db | grep -E ': .+' | awk '{FS=": ";print $1}' |[ \t]+|:)/, "")};1' | xargs -L 1 /root/ <remote_host> <remote_root_pass>

If you only want to sync (or resync) one or two databases, you can copy /var/cpanel/databases/dbindex.db to a different location and edit it as needed.

Here’s the bash sync script required for this command:

2 Responses to Syncing All MySQL Databases Between two Cpanel Servers

  1. eddie007 says:

    It’s really easy to remember password edge Browser, just go here and know that if you forget your password in the password with the help of pictures, then how to manage your saved password in Microsoft edge.

  2. Kate Magill says:

    I once had a chance to do work like this and I declined, despite the fact that the cash would have been really great. I declined not just on the grounds that it is Custom Essay Writing Service – unscrupulous and rewards lethargy, but since I esteem my own composition an excessive amount to give some inadequate child some place a chance to get kudos for it.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Anti-Spam Quiz: