• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sync live server and development server

#11
[eluser]jedd[/eluser]
Quote:Your bash script tars all the MySQL databases doesn't it?

Correct. It's particularly useful for recovery, which is my goal, but obviously not yours.

Watch out for table type choices you make and the effect this has on the size and content of ibdata1 file. Some research is probably warranted here, as an aside, and if you decide to use this as an opportunity for doing backups.

You will also need to watch out for the information table and/or mysql table, which has bitten me in the past when I've done selective grabs from a MySQL instance. Your login & password, for example, for a given database are not stored in in that database - which is obvious when you think about it, but annoying if you don't.

Quote:I've been looking at "mysqldump" on the MySQL reference page.

Yes, this lets you choose your database(s). It's much slower, but that's all good if you're ready for that. If you are using just MyISAM table types, mysqlhotcopy (a perl mash-up) might be more useful - it'll be faster, certainly.

Quote:The rsync command looks really easy like this. I have ssh access, so I'm going to try this one out!

As observed already, do a man rsync on the box first, and make heavy use of the --dry-run and --verbose parameters while you're playing. You can, of course, do some insanely nasty things with a badly formulated rsync command. Start on small, out of the way data sets first, until you're comfortable with what is happening. Seriously, rsync gives me the willies.

#12
[eluser]jwindhorst[/eluser]
I just want to reiterate Jedd's concerns here about "auto-magically" tar'ing, moving/rsync'ing between servers. Highly HIGHLY recommend that you find or build a junk box first that you can play around on.

I watched a seasoned (although not that bright) programmer recover files from a tape back up over the root partition of a SKO Unix box once. It took us 4 days nearly around the clock to reinstall and rebuild the machine.

Not trying to scare you off of course, just trying to stress what kind of damage can be done if you test your scripts on live servers.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.