{"id":11,"date":"2017-12-02T10:25:00","date_gmt":"2017-12-02T10:25:00","guid":{"rendered":""},"modified":"2021-02-22T01:14:02","modified_gmt":"2021-02-22T01:14:02","slug":"encrypt-backup-your-data-with-rclone","status":"publish","type":"post","link":"https:\/\/www.tech-and-dev.com\/blog\/2017\/12\/encrypt-backup-your-data-with-rclone.html","title":{"rendered":"Encrypt &#038; Backup your Data With Rclone"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left;\">\n<div style=\"clear: both; text-align: center;\"><a style=\"margin-left: 1em; margin-right: 1em;\" href=\"https:\/\/www.tech-and-dev.com\/blog\/wp-content\/uploads\/2017\/12\/rclone-logo.png\"><img decoding=\"async\" title=\"Rclone\" src=\"https:\/\/www.tech-and-dev.com\/blog\/wp-content\/uploads\/2017\/12\/rclone-logo.png\" alt=\"Rclone logo\" border=\"0\" data-original-height=\"300\" data-original-width=\"400\" \/><\/a><\/div>\n<p>This tutorial is compatible with any storage service such as Amazon, Google Drive, buckets, SSHs or FTPs. However, I&#8217;ll be using Backblaze.com buckets. As of the date of this post,Backblaze offers 200GB for $1\/month, which is the cheapest on the net, followed by OVH cloud storage and Hubic (Also owned by OVH).<\/p>\n<p>This tutorial will cover the following:<br \/>\n1- Creating remote connection<br \/>\n2- Creating remote encrypted connection<br \/>\n3- Upload Data<br \/>\n4- Download Data<br \/>\n5- Different Commands &amp; Flags<\/p>\n<p><a name=\"more\"><\/a><\/p>\n<h2 style=\"text-align: left;\">1- Creating remote connection<\/h2>\n<p>Configure rclone and follow the steps<\/p>\n<pre>rclone config<\/pre>\n<p>Enter n for new connection<\/p>\n<pre>n<\/pre>\n<p>I&#8217;ll call my new connection &#8220;<b>remote<\/b>&#8221;<\/p>\n<p>I&#8217;ll store my backups on <b>backblaze<\/b>, make sure to create a bucket first from backblaze&#8217;s admin panel, I&#8217;ll call my bucket <b>etra-test<\/b><\/p>\n<p>Account ID &amp; key number can be found in backblaze, buckets section<\/p>\n<p>You can leave &#8220;Endpoint&#8221; empty<\/p>\n<p>This is my output:<\/p>\n<pre>rclone config<\/pre>\n<p>Current remotes:<\/p>\n<p>Name\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Type<\/p>\n<p>====\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ====<\/p>\n<p>e) Edit existing remote<\/p>\n<p>n) New remote<\/p>\n<p>d) Delete remote<\/p>\n<p>r) Rename remote<\/p>\n<p>c) Copy remote<\/p>\n<p>s) Set configuration password<\/p>\n<p>q) Quit config<\/p>\n<p>e\/n\/d\/r\/c\/s\/q&gt; n<\/p>\n<p>name&gt; remote<\/p>\n<p>Type of storage to configure.<\/p>\n<p>Choose a number from below, or type in your own value<\/p>\n<p>1 \/ Amazon Drive<\/p>\n<p>&#8220;amazon cloud drive&#8221;<\/p>\n<p>2 \/ Amazon S3 (also Dreamhost, Ceph, Minio)<\/p>\n<p>&#8220;s3&#8221;<\/p>\n<p>3 \/ Backblaze B2<\/p>\n<p>&#8220;b2&#8221;<\/p>\n<p>4 \/ Box<\/p>\n<p>&#8220;box&#8221;<\/p>\n<p>5 \/ Dropbox<\/p>\n<p>&#8220;dropbox&#8221;<\/p>\n<p>6 \/ Encrypt\/Decrypt a remote<\/p>\n<p>&#8220;crypt&#8221;<\/p>\n<p>7 \/ FTP Connection<\/p>\n<p>&#8220;ftp&#8221;<\/p>\n<p>8 \/ Google Cloud Storage (this is not Google Drive)<\/p>\n<p>&#8220;google cloud storage&#8221;<\/p>\n<p>9 \/ Google Drive<\/p>\n<p>&#8220;drive&#8221;<\/p>\n<p>10 \/ Hubic<\/p>\n<p>&#8220;hubic&#8221;<\/p>\n<p>11 \/ Local Disk<\/p>\n<p>&#8220;local&#8221;<\/p>\n<p>12 \/ Microsoft Azure Blob Storage<\/p>\n<p>&#8220;azureblob&#8221;<\/p>\n<p>13 \/ Microsoft OneDrive<\/p>\n<p>&#8220;onedrive&#8221;<\/p>\n<p>14 \/ Openstack Swift (Rackspace Cloud Files, Memset Memstore, OVH)<\/p>\n<p>&#8220;swift&#8221;<\/p>\n<p>15 \/ QingClound Object Storage<\/p>\n<p>&#8220;qingstor&#8221;<\/p>\n<p>16 \/ SSH\/SFTP Connection<\/p>\n<p>&#8220;sftp&#8221;<\/p>\n<p>17 \/ Yandex Disk<\/p>\n<p>&#8220;yandex&#8221;<\/p>\n<p>18 \/ http Connection<\/p>\n<p>&#8220;http&#8221;<\/p>\n<p>Storage&gt; 3<\/p>\n<p>Account ID<\/p>\n<p>account&gt; myaccountnumber<\/p>\n<p>Application Key<\/p>\n<p>key&gt; mykeynumber<\/p>\n<p>Endpoint for the service &#8211; leave blank normally.<\/p>\n<p>endpoint&gt;<\/p>\n<p>Remote config<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>[myremote]<\/p>\n<p>account = myaccountnumber<\/p>\n<p>key = mykeynumber<\/p>\n<p>endpoint =<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>y) Yes this is OK<\/p>\n<p>e) Edit this remote<\/p>\n<p>d) Delete this remote<\/p>\n<p>y\/e\/d&gt; y<\/p>\n<p>Current remotes:<\/p>\n<p>Name\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Type<\/p>\n<p>====\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ====<\/p>\n<p>remote\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 b2<\/p>\n<p>e) Edit existing remote<\/p>\n<p>n) New remote<\/p>\n<p>d) Delete remote<\/p>\n<p>r) Rename remote<\/p>\n<p>c) Copy remote<\/p>\n<p>s) Set configuration password<\/p>\n<p>q) Quit config<\/p>\n<p>e\/n\/d\/r\/c\/s\/q&gt;<\/p>\n<h2 style=\"text-align: left;\">2- Creating remote encrypted connection<\/h2>\n<p>Create new remote in rclone by entering n for new connection<\/p>\n<pre>n<\/pre>\n<p>I&#8217;ll call my new connection &#8220;<b>encremote<\/b>&#8221; which stands for encrypted remote<\/p>\n<p>Choose <b>#6 &#8220;Encrypt\/Decrypt a remote&#8221;<\/b><\/p>\n<p>I&#8217;ll be backing up my data in the previously created bucket called <b>etra-test<\/b>, so the remote to encrypt will be &#8220;<b>remote:etra-test<\/b>&#8220;.<\/p>\n<p>Create a hard to guess password and a hard to guess salt, make sure to not lose these, otherwise you won&#8217;t be able to decrypt your data in the future.<\/p>\n<p>Click q to quit<\/p>\n<pre>q<\/pre>\n<p>This is my output:<\/p>\n<pre>e) Edit existing remote<\/pre>\n<p>n) New remote<\/p>\n<p>d) Delete remote<\/p>\n<p>r) Rename remote<\/p>\n<p>c) Copy remote<\/p>\n<p>s) Set configuration password<\/p>\n<p>q) Quit config<\/p>\n<p>e\/n\/d\/r\/c\/s\/q&gt; n<\/p>\n<p>name&gt; encremote<\/p>\n<p>Type of storage to configure.<\/p>\n<p>Choose a number from below, or type in your own value<\/p>\n<p>1 \/ Amazon Drive<\/p>\n<p>&#8220;amazon cloud drive&#8221;<\/p>\n<p>2 \/ Amazon S3 (also Dreamhost, Ceph, Minio)<\/p>\n<p>&#8220;s3&#8221;<\/p>\n<p>3 \/ Backblaze B2<\/p>\n<p>&#8220;b2&#8221;<\/p>\n<p>4 \/ Box<\/p>\n<p>&#8220;box&#8221;<\/p>\n<p>5 \/ Dropbox<\/p>\n<p>&#8220;dropbox&#8221;<\/p>\n<p>6 \/ Encrypt\/Decrypt a remote<\/p>\n<p>&#8220;crypt&#8221;<\/p>\n<p>7 \/ FTP Connection<\/p>\n<p>&#8220;ftp&#8221;<\/p>\n<p>8 \/ Google Cloud Storage (this is not Google Drive)<\/p>\n<p>&#8220;google cloud storage&#8221;<\/p>\n<p>9 \/ Google Drive<\/p>\n<p>&#8220;drive&#8221;<\/p>\n<p>10 \/ Hubic<\/p>\n<p>&#8220;hubic&#8221;<\/p>\n<p>11 \/ Local Disk<\/p>\n<p>&#8220;local&#8221;<\/p>\n<p>12 \/ Microsoft Azure Blob Storage<\/p>\n<p>&#8220;azureblob&#8221;<\/p>\n<p>13 \/ Microsoft OneDrive<\/p>\n<p>&#8220;onedrive&#8221;<\/p>\n<p>14 \/ Openstack Swift (Rackspace Cloud Files, Memset Memstore, OVH)<\/p>\n<p>&#8220;swift&#8221;<\/p>\n<p>15 \/ QingClound Object Storage<\/p>\n<p>&#8220;qingstor&#8221;<\/p>\n<p>16 \/ SSH\/SFTP Connection<\/p>\n<p>&#8220;sftp&#8221;<\/p>\n<p>17 \/ Yandex Disk<\/p>\n<p>&#8220;yandex&#8221;<\/p>\n<p>18 \/ http Connection<\/p>\n<p>&#8220;http&#8221;<\/p>\n<p>Storage&gt; 6<\/p>\n<p>Remote to encrypt\/decrypt.<\/p>\n<p>Normally should contain a &#8216;:&#8217; and a path, eg &#8220;remote:path\/to\/dir&#8221;,<\/p>\n<p>&#8220;remote:bucket&#8221; or maybe &#8220;remote:&#8221; (not recommended).<\/p>\n<p>remote&gt; remote:etra-test<\/p>\n<p>How to encrypt the filenames.<\/p>\n<p>Choose a number from below, or type in your own value<\/p>\n<p>1 \/ Don&#8217;t encrypt the file names.\u00a0 Adds a &#8220;.bin&#8221; extension only.<\/p>\n<p>&#8220;off&#8221;<\/p>\n<p>2 \/ Encrypt the filenames see the docs for the details.<\/p>\n<p>&#8220;standard&#8221;<\/p>\n<p>3 \/ Very simple filename obfuscation.<\/p>\n<p>&#8220;obfuscate&#8221;<\/p>\n<p>filename_encryption&gt; 2<\/p>\n<p>Password or pass phrase for encryption.<\/p>\n<p>y) Yes type in my own password<\/p>\n<p>g) Generate random password<\/p>\n<p>y\/g&gt; y<\/p>\n<p>Enter the password:<\/p>\n<p>password:<\/p>\n<p>Confirm the password:<\/p>\n<p>password:<\/p>\n<p>Password or pass phrase for salt. Optional but recommended.<\/p>\n<p>Should be different to the previous password.<\/p>\n<p>y) Yes type in my own password<\/p>\n<p>g) Generate random password<\/p>\n<p>n) No leave this optional password blank<\/p>\n<p>y\/g\/n&gt; y<\/p>\n<p>Enter the password:<\/p>\n<p>password:<\/p>\n<p>Confirm the password:<\/p>\n<p>password:<\/p>\n<p>Remote config<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>[encremote]<\/p>\n<p>remote = remote:etra-test<\/p>\n<p>filename_encryption = standard<\/p>\n<p>password = *** ENCRYPTED ***<\/p>\n<p>password2 = *** ENCRYPTED ***<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>y) Yes this is OK<\/p>\n<p>e) Edit this remote<\/p>\n<p>d) Delete this remote<\/p>\n<p>y\/e\/d&gt; y<\/p>\n<p>Current remotes:<\/p>\n<p>Name\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Type<\/p>\n<p>====\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ====<\/p>\n<p>encremote\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 crypt<\/p>\n<p>remote\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0 \u00a0\u00a0 b2<\/p>\n<p>e) Edit existing remote<\/p>\n<p>n) New remote<\/p>\n<p>d) Delete remote<\/p>\n<p>r) Rename remote<\/p>\n<p>c) Copy remote<\/p>\n<p>s) Set configuration password<\/p>\n<p>q) Quit config<\/p>\n<p>e\/n\/d\/r\/c\/s\/q&gt; q<\/p>\n<p>&nbsp;<\/p>\n<h2 style=\"text-align: left;\">3- Upload Data<\/h2>\n<p>I&#8217;ll be uploading the content of the directory \/home\/pc\/pictures (Similar to C:UserspcPictures in Windows) to the encrypted remote &#8220;encremote&#8221;. &#8220;encremote&#8221; will automatically encrypt the data using the password and salt that was entered and will send them to &#8220;remote&#8221;, &#8220;remote&#8221; will then upload them automatically to the Backblaze bucket.<\/p>\n<pre>rclone copy \/home\/pc\/pictures encremote:<\/pre>\n<p>This will copy everything from \/home\/pc\/pictures to the Backblaze bucket, files that already exist will be skipped.<\/p>\n<p>You can also use &#8220;sync&#8221;, though I personally wouldn&#8217;t recommend it. &#8220;sync&#8221; will synchronize all the files in the source directory (\/home\/pc\/pictures) to the remote bucket, if the remote directory has files that the source don&#8217;t have, they will be deleted.<\/p>\n<pre>rclone sync \/home\/pc\/pictures encremote:<\/pre>\n<h2 style=\"text-align: left;\">4- Download Data<\/h2>\n<p>I&#8217;ll be downloading the files from the remote &#8220;encremote&#8221; to \/home\/pc\/test. If you want to download them to another PC, make sure to follow Step 1 and Step 2 with the same password and salt.<\/p>\n<pre>rclone copy encremote: \/home\/pc\/test<\/pre>\n<p>This will copy everything from encremote: to \/home\/pc\/test and skip the files that already exist<\/p>\n<h2 style=\"text-align: left;\">5- Different Commands &amp; Flags<\/h2>\n<p>You can always check the content of a remote or an encrypted remote.<br \/>\nThe following will show the content of the encrypted remote:<\/p>\n<pre>rclone ls encremote:<\/pre>\n<p>The following will show the encrypted files and directories inside the bucket<\/p>\n<pre>rclone ls remote:<\/pre>\n<p>When copying files, you can use several paramters, most importantly<\/p>\n<pre>--bwlimit intValue<\/pre>\n<p>This will limit your bandwidth upload speed (in KB\/s)<\/p>\n<p>You can use -v to print details about the copy\/sync. You can use -v several times for more details, example<\/p>\n<pre>-v<\/pre>\n<p>or<\/p>\n<pre>-v -v -v<\/pre>\n<p>You can also limit the number of files to copy, by default rclone copy 4 files at the same time.<\/p>\n<pre>--transfers intValue<\/pre>\n<p>Example:<\/p>\n<pre>rclone copy --bwlimit 55 -v -v -v --transfers 2 \/home\/pc\/pictures encremote:<\/pre>\n<p><b>Questions or comments? Post below <\/b><\/p>\n<p>&nbsp;<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial is compatible with any storage service such as Amazon, Google Drive, buckets, SSHs or FTPs. However, I&#8217;ll be using Backblaze.com buckets. As of the date of this post,Backblaze offers 200GB for $1\/month, which is the cheapest on the net, followed by OVH cloud storage and Hubic (Also owned by OVH). This tutorial will [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[12],"tags":[],"class_list":["post-11","post","type-post","status-publish","format-standard","hentry","category-rclone"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/posts\/11","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/comments?post=11"}],"version-history":[{"count":2,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/posts\/11\/revisions"}],"predecessor-version":[{"id":389,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/posts\/11\/revisions\/389"}],"wp:attachment":[{"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/media?parent=11"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/categories?post=11"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/tags?post=11"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}