<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>GPG &#8211; Johnny Morano&#039;s Tech Articles</title>
	<atom:link href="https://jmorano.moretrix.com/tag/gpg/feed/" rel="self" type="application/rss+xml" />
	<link>https://jmorano.moretrix.com</link>
	<description>Ramblings of an old-fashioned space cowboy</description>
	<lastBuildDate>Thu, 09 Aug 2012 12:03:13 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.6.2</generator>

<image>
	<url>https://jmorano.moretrix.com/wp-content/uploads/2022/04/cropped-jmorano_emblem-32x32.png</url>
	<title>GPG &#8211; Johnny Morano&#039;s Tech Articles</title>
	<link>https://jmorano.moretrix.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Secure MySQL Backups with GnuPG</title>
		<link>https://jmorano.moretrix.com/2012/08/secure-mysql-backups-gnupg/</link>
					<comments>https://jmorano.moretrix.com/2012/08/secure-mysql-backups-gnupg/#respond</comments>
		
		<dc:creator><![CDATA[Johnny Morano]]></dc:creator>
		<pubDate>Thu, 09 Aug 2012 12:03:13 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[GPG]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PGP]]></category>
		<category><![CDATA[SysAdmin]]></category>
		<category><![CDATA[UNIX]]></category>
		<guid isPermaLink="false">http://jmorano.moretrix.com/?p=871</guid>

					<description><![CDATA[One way to secure your MySQL backups, is to encrypt the backup file using PGP/GnuPG. Of course you&#8230;]]></description>
										<content:encoded><![CDATA[<p>One way to secure your MySQL backups, is to encrypt the backup file using PGP/GnuPG. Of course you will need to own a PGP/GnuPG private key, which can be easily created using the PGP/GnuPG tools.</p>
<p>On a Debian/Ubuntu Linux host, install the &#8216;gnupg&#8217; package.</p>
<pre class="brush:shell">
# apt-get install gnupg
</pre>
<p>After installation, generate a PGP/GnuPG key using the &#8216;gpg&#8217; command and go through the questions:</p>
<pre class="brush:shell">
# gpg --gen-key
gpg (GnuPG) 1.4.12; Copyright (C) 2012 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Please select what kind of key you want:
   (1) RSA and RSA (default)
   (2) DSA and Elgamal
   (3) DSA (sign only)
   (4) RSA (sign only)
Your selection?
*snip*
</pre>
<p>Once your key has been generated, you are ready to start using it.</p>
<p>In this example, MySQL backups will be created using the &#8216;mysqldump&#8217; command. The output of that command will be compressed using &#8216;gzip&#8217;, since the &#8216;mysqldump&#8217; generates plain text output.</p>
<p>The &#8216;gpg&#8217; command takes two arguments:</p>
<ol>
<li>&#8211;encrypt : to define that we will encrypting the output coming STDOUT</li>
<li>-r user@domain.com : this parameter defines the key that will be used for the encryption</li>
</ol>
<p>When we put all these commands together:</p>
<pre class="brush:shell">

$ mysqldump --all-databases -uroot -psecret \
 | gzip - \
 | gpg --encrypt -r user@domain.com >mysql_dump_sql.bkp

</pre>
<p>The above example could be used in a cronjob to have daily backups.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jmorano.moretrix.com/2012/08/secure-mysql-backups-gnupg/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
