1

Server setup (fake IPs)

  • utility - 1.1.1.1 - SSH access on public IP
  • database2 - 1.1.1.2 - SSH access on private IP from utility

On a semi-regular basis I need to do a mysqldump on database2 and pull that down to my local machine so I can debug our app with real data. My current process is as follows:

  • ssh into utility
  • ssh into database2
  • execute mysqldump command
  • exit from database2
  • scp dump file down to utility
  • exit utility
  • scp dump file down to local machine

Needless to say this is not optimal. Is there a quicker method, possibly via tunneling, that I could use given my setup?

Gregg
  • 34,973
  • 19
  • 109
  • 214

1 Answers1

0

you can

  1. make dump by cron on database2
  2. make port forward on utility and connect at once to database2

summary: you will get dump by one scp command.

UPD:

if you can't port forward or cron, you can add access to database from utility and make mysqldump from him.

askovpen
  • 2,438
  • 22
  • 37
  • I don't really want to run a cron. When I do a mysqldump I really just want a specific snapshot at that given time. Also, I'd appreciate more detailed answers. I'm not a sysadmin and help in what commands to run would be best. As in examples. – Gregg Apr 25 '12 at 20:07
  • @Gregg, which OS/firewall on utility? – askovpen Apr 25 '12 at 20:10