Re: Backup to cloud?

From: Lew Pitcher <lew.pitcher_at_digitalfreehold.ca>
Date: Tue, 13 Dec 2016 14:08:38 -0500
Message-ID: <o2pgt3$8q9$1_at_dont-email.me>


[Quoted] [Quoted] On Tuesday December 13 2016 13:37, in comp.databases.mysql, "Rhino" <no_offline_contact_at_example.com> wrote:

> I know of The Cloud

You write "the cloud" as if it were a single, tangable thing. It's not. "The cloud" refers to services hosted on systems accessable through a network; typically, Internet-accessable services, but not necessarily.

> but I haven't had to write code that works with the
> cloud yet. Is it possible to back up a MySQL database (using the current
> Windows version) to the cloud?

It is possible to back up or replicate a MySQL database through a network connection. "The Cloud" could, in this case, be another instance of the MySQL server, running on another system, accessable through your network. Or, it could be an rsync, rcp or even ftp server, again running on another system accessable through your network.

> If so, how does one write the command to
> do so? I'm not sure what the syntax should look like.

The simplest way might be to use mysqldump or mysqlhotcopy to dump the database to a file, then rsync it to the remote system ("the cloud"). Read the documentation on mysqldump, mysqlhotcopy, and your favourite file transfer program (rsync, rcp, etc), for the details on this approach.

If you have access to a second MySQL server on "the cloud", then you can have your MySQL server "replicate" databases, in real-time to the second MySQL server. This isn't an easy thing to set up, as it needs both MySQL servers to recognize the configuration. If this interests you, see

   http://dev.mysql.com/doc/refman/5.7/en/replication.html for details.

> If it is not possible to do a backup directly to the cloud, how could I
> do it indirectly?

Directly: use replication
Indirectly: mysqldump and rcp (or other)

HTH

-- 
Lew Pitcher
"In Skills, We Trust"
PGP public key available upon request
Received on Tue Dec 13 2016 - 20:08:38 CET

Original text of this message