<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Juan Carizza</title>
    <description>The latest articles on DEV Community by Juan Carizza (@jcarizza).</description>
    <link>https://dev.to/jcarizza</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F262343%2Fa259a734-a3dc-4489-9cb9-00f82394712d.jpg</url>
      <title>DEV Community: Juan Carizza</title>
      <link>https://dev.to/jcarizza</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jcarizza"/>
    <language>en</language>
    <item>
      <title>Upload backups to AWS Glacier</title>
      <dc:creator>Juan Carizza</dc:creator>
      <pubDate>Mon, 13 Jan 2020 21:52:33 +0000</pubDate>
      <link>https://dev.to/jcarizza/upload-backups-to-aws-glacier-37a8</link>
      <guid>https://dev.to/jcarizza/upload-backups-to-aws-glacier-37a8</guid>
      <description>&lt;p&gt;with a worth of $0.004 per GB of storage AWS Glacier is a good choice to store backups.&lt;/p&gt;

&lt;p&gt;The problem is that you need to do some extra work to upload one file, but one library resolve all of it.&lt;/p&gt;

&lt;p&gt;The library support Python&amp;gt;3.5, you can install &lt;a href="https://github.com/pyenv/pyenv-installer"&gt;pyenv&lt;/a&gt; to handle python versions to add the python version supported by this library &lt;a href="https://github.com/tbumi/glacier-upload"&gt;glacier-upload&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Install pyenv for Python version handler if you've a version of python &amp;lt;3.5&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; curl https://pyenv.run | bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create a virtualenv to install dependencies&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pyenv install 3.5.9
pyenv virtualenv 3.5.9 glacier
pyenv activate glacier
(glacier) pip install upload_glacier
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Configure amazon boto credentials&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vim ~/.aws/credentials
[default]
aws_access_key_id=AKIA2DECGLYHEBIJDI7D
aws_secret_access_key=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
region=us-west-2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Upload first backup. (The files take some minutes to appear listed in the vault)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(glacier) webuser@scully:~# glacier_upload  --vault-name backups-server-1 -f backup.tar.gz
Reading file...
Opened single file.
Initiating multipart upload...
File size is 1336872 bytes. Will upload in 1 parts.
Spawning threads...
Uploading part 1 of 1... (0.00%)
Completing multipart upload...
Upload successful.
Calculated total tree hash: d627aea450fde4f3c97ff63a5298c012dab73874e4cd443d9b0cf8466e7b0ade
Glacier total tree hash: d627aea450fde4f3c97ff63a5298c012dab73874e4cd443d9b0cf8466e7b0ade
Location: /693910265358/vaults/backups-nd-1/archives/i7CWC_v5uhohwh9VX1QYQdVeYjy533DXp6t7XJ6um3d7uKiCoJt6cydBAKTwfR9CfDnyEIQCN2Xo43FP6xmt3gz_87eCxd5tAsEBEZzR1vjgUUaHmAtdeDqSrKX8rPwT-2_GEZpWnA
Archive ID: i7CWC_v5uhohwh9VX1QYQdVeYjy533DXp6t7XJ6um3d7uKiCoJt6cydBAKTwfR9CfDnyEIQCN2Xo43FP6xmt3gz_87eCxd5tAsEBEZzR1vjgUUaHmAtdeDqSrKX8rPwT-2_GEZpWnA
Done.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>glacier</category>
      <category>python</category>
      <category>upload</category>
    </item>
  </channel>
</rss>
