- SIPit 26 - Why SIP testing is important to Asterisk and to you
- Voip Users Conference March 26th
- Attrafax t.30 and t.38 alternative now released as gpl2 and commercial license
- New patch for app_queue to show all call attempts
- Asterisk 1.4.30-rc3, 1.6.0.26-rc1, 1.6.1.18-rc1, and 1.6.2.6-rc1 Now Available
- GSoC 2010 - Calling for Project Ideas and Mentors
- Video of Mark Spencer
- Call Completion: Asterisk Component
- Audio to remote AGI server
- Asterisk iPhone: New version of AsteriskRef online
- Asterisk 1.2.40, 1.4.29.1, 1.6.0.24, 1.6.1.16, and 1.6.2.4 Now Available
- AST-2010-002: Dialplan injection vulnerability
- A2Billing 1.6 Release
- AsteriskRef Free iPhone application available on app store
MySQLDump To a Remote Server
I was running out of disk space on a server today. The server had a large database table that was no longer used, so I wanted to archive it and then drop the table. But the server didn’t have enough disk space to dump it out to disk before copying it off to a remote server for archiving.
The first thought was to run mysqldump dump on the destination machine, and to access the database over the network. That however, doesn’t compress or encrypt the data. Plus I would have had to create a mysql user with permission to access the database remotely.
The solution I came up with worked out well: mysqldump directly to the remote host with this command:
mysqldump [mysqldump options] | gzip -c | ssh user@remotehost "cat > /path/to/some-file.sql.gz"
That pipes the mysqldump command through gzip, then to through and SSH connection. SSH on the remote side runs the ‘cat’ command to read the stdin, then redirects that to the actual file where I want it saved.
By Brandon Checketts
http://www.brandonchecketts.com/archives/mysqldump-to-a-remote-server
- Login to post comments
