<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Rsync.net on paapereira.xyz</title><link>https://paapereira.xyz/tags/rsync.net/</link><description>Recent content in Rsync.net on paapereira.xyz</description><generator>Hugo</generator><language>en-US</language><copyright>&lt;a href='https://creativecommons.org/licenses/by-nc/4.0/' target='_blank' rel='noopener'>©&lt;/a> 2008-2026 / &lt;a href='https://gitlab.com/paapereira/paapereira.gitlab.io' target='_blank' rel='noopener'>source code&lt;/a></copyright><lastBuildDate>Mon, 28 Nov 2016 21:02:25 +0000</lastBuildDate><atom:link href="https://paapereira.xyz/tags/rsync.net/index.xml" rel="self" type="application/rss+xml"/><item><title>GPG encrypted backups to rsync.net</title><link>https://paapereira.xyz/posts/2016/11/rsyncnet-gpg-backups/</link><pubDate>Mon, 28 Nov 2016 21:02:25 +0000</pubDate><guid>https://paapereira.xyz/posts/2016/11/rsyncnet-gpg-backups/</guid><description>&lt;p>I use &lt;a href="https://rsync.net">rsync.net&lt;/a> for my cloud/offline backups.&lt;/p>
&lt;p>Here’s how to do gpg encrypted backups.&lt;/p>
&lt;ul>
&lt;li>Mount rsync.net using &lt;code>sshfs&lt;/code> and create a backup folder&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">1&lt;/span>&lt;span>mkdir -p /home/your_user/rsync.net/
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">2&lt;/span>&lt;span>sshfs 99999@server.rsync.net: /home/your_user/rsync.net/
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">3&lt;/span>&lt;span>mkdir -p /home/your_user/rsync.net/backups/
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;ul>
&lt;li>Create and encript a directory&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">1&lt;/span>&lt;span>tar --xattrs -czpvf /tmp/2016-11-28_my_dir.tgz -C /home/your_user/my_dir .
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">2&lt;/span>&lt;span>gpg --cipher-algo aes256 -c -o /home/your_user/rsync.net/backups/2016-11-28_my_dir.tgz.gpg /tmp/2016-11-28_my_dir.tgz
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;ul>
&lt;li>Restore and decrypt a directory&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">1&lt;/span>&lt;span>mkdir -p /tmp/extract
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">2&lt;/span>&lt;span>cd /tmp/extract
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">3&lt;/span>&lt;span>gpg -o- /tmp/2016-11-28_my_dir.tgz.gpg | tar zxvf -
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;ul>
&lt;li>Unmount rsync.net&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">1&lt;/span>&lt;span>fusermount -u /home/your_user/rsync.net/
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Backups using ecryptfs and rsync.net</title><link>https://paapereira.xyz/posts/2016/11/rsyncnet-ecryptfs-backups/</link><pubDate>Sun, 27 Nov 2016 21:12:33 +0000</pubDate><guid>https://paapereira.xyz/posts/2016/11/rsyncnet-ecryptfs-backups/</guid><description>&lt;p>I use &lt;a href="https://rsync.net">rsync.net&lt;/a> for my cloud/offline backups.&lt;/p>
&lt;p>Here’s how to do encrypted backups using &lt;code>ecryptfs&lt;/code>.&lt;/p>
&lt;ul>
&lt;li>Install &lt;code>ecryptfs-utils&lt;/code>&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">1&lt;/span>&lt;span>sudo pacman -S ecryptfs-utils
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;ul>
&lt;li>Generate a passphrase&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">1&lt;/span>&lt;span>ecryptfs-setup-private --nopwcheck --noautomount
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;ul>
&lt;li>Mount rsync.net using &lt;code>sshfs&lt;/code> and create a backup folder&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">1&lt;/span>&lt;span>mkdir -p /home/your_user/rsync.net/
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">2&lt;/span>&lt;span>sshfs 99999@server.rsync.net: /home/your_user/rsync.net/
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">3&lt;/span>&lt;span>mkdir -p /home/your_user/rsync.net/backups/
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;ul>
&lt;li>Mount the backups folder as an encrypted filesystem and copy some files&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">1&lt;/span>&lt;span>sudo mount -t ecryptfs ~/.Private /home/your_user/rsync.net/backups -o key&lt;span style="color:#f92672">=&lt;/span>passphrase,ecryptfs_cipher&lt;span style="color:#f92672">=&lt;/span>aes,ecryptfs_key_bytes&lt;span style="color:#f92672">=&lt;/span>24,ecryptfs_passthrough&lt;span style="color:#f92672">=&lt;/span>n,ecryptfs_enable_filename_crypto&lt;span style="color:#f92672">=&lt;/span>n
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;ul>
&lt;li>Unmount rsync.net and the encrypted filesystem mount&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">1&lt;/span>&lt;span>sudo umount ~/Private
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">2&lt;/span>&lt;span>fusermount -u /home/your_user/rsync.net/
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>rsync.net mysqlbackup.sh</title><link>https://paapereira.xyz/posts/2012/08/rsyncnet-mysqlbackupsh/</link><pubDate>Thu, 16 Aug 2012 23:39:00 +0100</pubDate><guid>https://paapereira.xyz/posts/2012/08/rsyncnet-mysqlbackupsh/</guid><description>&lt;p>Following up on my &lt;a href="https://paapereira.xyz/posts/backing-up-mysql-in-b3-server/">post&lt;/a> about backing up mysql using &lt;a href="http://rsync.net/">rsync.net&lt;/a>, I created a &lt;a href="https://github.com/paapereira/rsync.net-mysqlbackup">github&lt;/a> repository to keep and improve the script.&lt;/p>
&lt;p>It uses mysqlhotcopy and duplicity to backup mysql databases to rsync.net.&lt;/p>
&lt;p>Stay tuned for the first milestone release.&lt;/p>
&lt;p>&lt;img src="https://paapereira.xyz/blog/2012/2012-08-16-rsyncnet-mysqlbackupsh/github.png" alt="rsync.net-mysqlbackup">&lt;/p></description></item><item><title>Backing up MySQL in B3 Server to rsync.net</title><link>https://paapereira.xyz/posts/2011/11/backing-up-mysql-in-b3-server/</link><pubDate>Sun, 06 Nov 2011 18:27:00 +0000</pubDate><guid>https://paapereira.xyz/posts/2011/11/backing-up-mysql-in-b3-server/</guid><description>&lt;p>In a &lt;a href="https://paapereira.xyz/posts/offsite-backups-with-rsyncnet/">previous&lt;/a> post I talked about how to backup to &lt;a href="http://rsync.net/">rsync.net&lt;/a> using &lt;a href="http://duplicity.nongnu.org/">duplicity&lt;/a>.&lt;/p>
&lt;p>I will now show how to backup your &lt;a href="http://www.excito.com/">B3 Server&lt;/a> Mysql databases using the same method.&lt;/p>
&lt;h2 id="installation">Installation&lt;/h2>
&lt;p>Be sure duplicity is installed:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">1&lt;/span>&lt;span>su
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">2&lt;/span>&lt;span>apt-get install duplicity
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="generate-an-ssh-key-to-connect-to-rsyncnet">Generate an ssh key to connect to rsync.net&lt;/h2>
&lt;ul>
&lt;li>Generate the ssh key using the defaults (don&amp;rsquo;t use a password when asked):&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">1&lt;/span>&lt;span>ssh-keygen -t rsa
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;ul>
&lt;li>Copy your key to rsync.net (if you don&amp;rsquo;t have no one there):&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">1&lt;/span>&lt;span>scp ~/.ssh/id_rsa.pub user@server.rsync.net:.ssh/authorized_keys
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;ul>
&lt;li>If you already have a key from another machine or user in rsyn.net, you need to add a new one:&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">1&lt;/span>&lt;span>cat ~/.ssh/id_rsa.pub | ssh user@server.rsync.net &lt;span style="color:#e6db74">&amp;#39;dd of=.ssh/authorized_keys oflag=append conv=notrunc&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="generate-a-gpg-public-and-private-key-to-encrypt-your-backups">Generate a gpg public and private key to encrypt your backups&lt;/h2>
&lt;ul>
&lt;li>Generate the gpg keys (get down your private key, example: &lt;em>123AbcH123BB4321&lt;/em>):&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">1&lt;/span>&lt;span>gpg --gen-key
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;ul>
&lt;li>You can check the keys in your system:&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">1&lt;/span>&lt;span>gpg --list-keys
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;ul>
&lt;li>Look in the output something like this. Look for the public key (in this example your public key is &lt;em>1AAB123A&lt;/em>)&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-text" data-lang="text">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">1&lt;/span>&lt;span>pub 1239A/**1AAB123A** 2011-10-09 [expires: 2012-10-08]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">2&lt;/span>&lt;span>uid Your Name (name) &amp;lt;mail@mail.com&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">3&lt;/span>&lt;span>sub 54321/1234BBCC 2011-10-09 [expires: 2012-10-08]
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="backuprestore-your-databases">Backup/restore your databases&lt;/h2>
&lt;p>I have MyISAM tables, so I will be using the &lt;a href="http://dev.mysql.com/doc/refman/5.0/en/mysqlhotcopy.html">mysqlhotcopy&lt;/a> command. You can also use &lt;a href="http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html">mysqldump&lt;/a>.&lt;/p></description></item><item><title>Offsite backups with rsync.net</title><link>https://paapereira.xyz/posts/2011/10/offsite-backups-with-rsyncnet/</link><pubDate>Sun, 09 Oct 2011 23:21:00 +0100</pubDate><guid>https://paapereira.xyz/posts/2011/10/offsite-backups-with-rsyncnet/</guid><description>&lt;p>If you don&amp;rsquo;t do backups&amp;hellip; well, you should.&lt;/p>
&lt;p>An example of a good backup system could be:&lt;/p>
&lt;ul>
&lt;li>External drive backups: your computer is backed up at an external drive;&lt;/li>
&lt;li>CD/DVD backups: burn your backups to a CD or DVD;&lt;/li>
&lt;li>Offsite backups: your backups are located at a different site, ie, another place other than your home or office.&lt;/li>
&lt;/ul>
&lt;p>A good idea is to have all three backup systems in place. External drivers can brake and DVDs are misplaced, so a offsite location for your backups are a good idea.&lt;/p></description></item></channel></rss>