The Blog

Copy database or table from one MySQL server to another, clever way.

Posted on

This simple bash script can copy database or a table from one remote server to another. Can be used as a backup, but also as a one way sync on a database or table.

ssh -fNg… <- creates a permanent tunnel to the remote server on port 3307. So now from the local server you can access both local and remote MySQL.

export MYSQL_PWD=… <- Helps hide password, as long as you make this script secure, the password it not accessible.

Last one-liner does the rest, if you remove <DB_TABLE_NAME> it will send the entire DB over to the remote, so be carefuller. But you already new that and have a backup, right?

Read More

Posted in Linux, MySQL Leave a comment

Restore full 2008 from windows backup on the network with no DHCP

Posted on

Start Windows with F8 if you still can, if not boot with windows install disk.
If your backup is on the network you might have to set the network to get to the backup, if like in my case there is no DHCP then you got more work to do.
First go to command prompt and start with:

Start /w wpeinit

next run the bellow, just make sure you put the right IPs
netsh interface ip set address "Local Area Connection" static 192.168.128.55 255.255.255.0 192.168.128.201

after that you should be able to access your NET and get the restore going.

Posted in Server 2008 Stuff, Windows 293 Comments
Next Page »