I’m bringing the development server for a web application I work on back online. Currently it’s extremely outdated (filesystem and database). Does anyway have a good/efficient way to do this?
Right now I am backing up the database from the live server so that I can import it into the development server, and then I am going to replace the files in the development filesystem with the live filesystem (most up to date).
This is the first time I will be doing something like this, and I DON’T want to mess up the database (well over 2GB in size). Can anyone give me some tips and recommendations?
Also, is there a way to have changes made to the live database sync back to the dev database, but without changes in the dev database being synced back to the live database?
Thank you!
I’m bringing the development server for a web application I work on back online.
Share
Use mysqldump on the live server to get everything. It will create all the necc statements: drop tables, create database, etc. Call mysql with the resulting file (as a < pipe ) into the dev server (after clearing it out, if need be) to have it read everything in.
To keep the dev server in sync with the live, set it up as a replication slave.
In one line (for one DB):
From: http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html