{"id":83359,"date":"2018-05-31T09:18:49","date_gmt":"2018-05-31T16:18:49","guid":{"rendered":"https:\/\/www.backblaze.com\/blog\/?p=83359"},"modified":"2025-12-12T14:54:29","modified_gmt":"2025-12-12T22:54:29","slug":"backing-up-github-to-cloud-storage","status":"publish","type":"post","link":"https:\/\/www.backblaze.com\/blog\/backing-up-github-to-cloud-storage\/","title":{"rendered":"Backing Up GitHub to Backblaze B2"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-83386 size-full\" title=\"How to Backup GitHub to the Cloud\" src=\"https:\/\/www.backblaze.com\/blog\/wp-content\/uploads\/2018\/05\/github-to-b2-blue.jpg\" alt=\"GitHub to B2\" width=\"1440\" height=\"820\" srcset=\"https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2018\/05\/github-to-b2-blue.jpg 1440w, https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2018\/05\/github-to-b2-blue-300x171.jpg 300w, https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2018\/05\/github-to-b2-blue-1024x583.jpg 1024w, https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2018\/05\/github-to-b2-blue-768x437.jpg 768w, https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2018\/05\/github-to-b2-blue-560x319.jpg 560w, https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2018\/05\/github-to-b2-blue-220x124.jpg 220w\" sizes=\"auto, (max-width: 1440px) 100vw, 1440px\" \/><\/p>\n<div class=\"abstract\" style=\"line-height: 1.5; padding: 20px 12px;\">\n<p><b>Editor&#8217;s Note:<\/b>\u00a0 This post was written just before the news came out that <a href=\"https:\/\/blogs.microsoft.com\/blog\/2018\/06\/04\/microsoft-github-empowering-developers\/\" target=\"_blank\" rel=\"noopener noreferrer\">Microsoft was buying GitHub<\/a>. As a result of that news, there has been a great deal of discussion among developers about what will happen after the acquisition.<\/p>\n<p style=\"margin-top: 15px;\">Some are concerned that Microsoft&#8217;s history with open source shows that they could change GitHub in ways that will make it less friendly to open source developers. Some alternatives to GitHub are experiencing high traffic as developers explore other open source coding communities. These include <a href=\"https:\/\/about.gitlab.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">GitLab<\/a>, <a href=\"https:\/\/bitbucket.org\/product\" target=\"_blank\" rel=\"noopener noreferrer\">BitBucket<\/a>, <a href=\"https:\/\/sourceforge.net\/\" target=\"_blank\" rel=\"noopener noreferrer\">SourceForge<\/a>, and <a href=\"https:\/\/launchpad.net\/\" target=\"_blank\" rel=\"noopener noreferrer\">Launchpad<\/a>.<\/p>\n<p>Microsoft&#8217;s President Satya Nadella is <a href=\"http:\/\/www.businessinsider.com\/microsoft-ceo-satya-nadella-asks-developers-to-give-github-acquisition-a-chance-2018-6\" target=\"_blank\" rel=\"noopener noreferrer\">asking developers to give Microsoft a chance<\/a> to show that they will support and nurture the open source community. See <a href=\"http:\/\/aka.ms\/ms06042018\" target=\"_blank\" rel=\"noopener noreferrer\">Microsoft&#8217;s presentation on the acquisition<\/a>. We&#8217;ll have to wait and see what happens next.<\/p>\n<p>The key issue comes down to trust. Whom do you trust with your code? We at Backblaze believe we&#8217;ve earned the trust of our users through our commitment to high quality services at a reasonable price, and being transparent in our business decisions and operations. Here&#8217;s a link to a Reddit discussion entitled, <a href=\"https:\/\/www.reddit.com\/r\/backblaze\/comments\/8oczbl\/how_do_i_know_backblaze_can_be_trusted\/\" target=\"_blank\" rel=\"noopener noreferrer\">How do I know that Backblaze can be trusted?<\/a> that addresses who we are as a company and why encryption is important &#8212; <span style=\"font-style: italic;\">Trust, but encrypt<\/span>.<\/p>\n<p>Whether you decide to stick with and trust GitHub under new ownership, or give another developer community a shot, it&#8217;s always best to have your code backed up. The post below provides a simple script to back up your GitHub code to the Backblaze cloud, which is a good idea in any case while you decide what to do next.<\/p>\n<\/div>\n<p>GitHub is the largest host of source code in the world, with over 26 million users and 57 million code repositories. That&#8217;s a lot of code.<\/p>\n<p>If you&#8217;re using GitHub, you want to make sure that your hard work isn&#8217;t lost. What happens if a repository or gist is removed or changed due to involuntary deletion, a forced push, or you lose metadata information? There are some paid backup services for GitHub, and the GitHub Enterprise product includes backup, but what if you don&#8217;t use either? What&#8217;s the best way to make sure there&#8217;s a secure copy of your code in a place other than GitHub and your local computer?<\/p>\n<p>Our VP of Sales, and inveterate code tinkerer, decided he could tackle this problem, so he forked a GitHub script to work with our <a href=\"https:\/\/www.backblaze.com\/docs\/cloud-storage-about-backblaze-b2-cloud-storage\">B2 Cloud Storage<\/a>. The script is below. All you need to do is <a href=\"https:\/\/www.backblaze.com\/b2\/sign-up.html\" target=\"_blank\" rel=\"noopener noreferrer\">sign up for a B2 account <\/a>on our website. The first 10 GB of data on B2 is free, so if your backup is under that size, congratulations, this backup is on us.<\/p>\n<p>The script is on GitHub at: <a href=\"https:\/\/gist.github.com\/nilayp\/a2719ca5695c1d5a56c556e89207577d\" target=\"_blank\" rel=\"noopener noreferrer\">Complete git repository backup script to Backblaze B2<\/a><\/p>\n<p><script src=\"https:\/\/gist.github.com\/nilayp\/a2719ca5695c1d5a56c556e89207577d.js\"><\/script><\/p>\n<p>Credit to <a href=\"https:\/\/gist.github.com\/philippb\" target=\"_blank\" rel=\"noopener noreferrer\">Philipp Berner<\/a> for the <a href=\"https:\/\/gist.github.com\/philippb\/1988919\" target=\"_blank\" rel=\"noopener noreferrer\">script<\/a> this was based on.<\/p>\n<p>For more information about backing up GitHub, see <a title=\"Backing up a repository\" href=\"https:\/\/help.github.com\/articles\/backing-up-a-repository\/\" target=\"_blank\" rel=\"noopener noreferrer\">GitHub Help<\/a>.<\/p>\n<div style=\"margin: 22px auto; text-align: center; max-width: 74%;\"><a title=\"Backing up a repository\" href=\"https:\/\/help.github.com\/articles\/backing-up-a-repository\/\" target=\"_blank\" rel=\"noopener noreferrer\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-83370 size-full\" src=\"https:\/\/www.backblaze.com\/blog\/wp-content\/uploads\/2018\/05\/github-logo.png\" alt=\"GitHub logo\" width=\"2000\" height=\"665\" srcset=\"https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2018\/05\/github-logo.png 2000w, https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2018\/05\/github-logo-300x100.png 300w, https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2018\/05\/github-logo-1024x340.png 1024w, https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2018\/05\/github-logo-768x255.png 768w, https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2018\/05\/github-logo-1536x511.png 1536w, https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2018\/05\/github-logo-1600x533.png 1600w, https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2018\/05\/github-logo-560x186.png 560w\" sizes=\"auto, (max-width: 2000px) 100vw, 2000px\" \/><\/a><\/div>\n<hr style=\"border: 0; height: 2px; background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0)); max-width: 85%; margin: 18px auto;\" \/>\n<p style=\"color: #666666; font-size: 18px; font-weight: 600; font-style: italic;\">Update June 25, 2018<\/p>\n<p>Nathan, Solutions Engineer at Backblaze, created a batch file for backing up a GitHub repository from Windows. The batch file assumes that B2 <a href=\"https:\/\/www.backblaze.com\/b2\/docs\/quick_command_line.html\" target=\"_blank\" rel=\"noopener noreferrer\">command-line tool<\/a>, Python, and 7ZIP are installed. The batch file requires that some variables (B2 account, etc) are filled in.<\/p>\n<p>The script can be found at BackupGHRepoToBackblaze.bat.<\/p>\n<p><script src=\"https:\/\/gist.github.com\/nathanverrilli\/9cdb980e697bd83f8630b77b4b12d33f.js\"><\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;re using GitHub, you want to make sure that your hard work is safe. What happens if a repository or gist is lost?  Here&#8217;s a quick solution to keep a copy of your code secure in the cloud.<\/p>\n","protected":false},"author":133,"featured_media":83386,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"content-type":"","footnotes":"","jetpack_post_was_ever_published":false},"categories":[121],"tags":[291,373,426],"class_list":["post-83359","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-backing-up","tag-b2","tag-developer","tag-github","entry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>GitHub Backup Solutions: How to Back Up Your GitHub Data to Backblaze B2<\/title>\n<meta name=\"description\" content=\"If you&#039;re using Github, you want to make sure that your hard work isn&#039;t lost. Learn how to back it up to the cloud.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.backblaze.com\/blog\/backing-up-github-to-cloud-storage\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"GitHub Backup Solutions: How to Back Up Your GitHub Data to Backblaze B2\" \/>\n<meta property=\"og:description\" content=\"If you&#039;re using Github, you want to make sure that your hard work isn&#039;t lost. Learn how to back it up to the cloud.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.backblaze.com\/blog\/backing-up-github-to-cloud-storage\/\" \/>\n<meta property=\"og:site_name\" content=\"Backblaze Blog | Cloud Storage &amp; Cloud Backup\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/backblaze\" \/>\n<meta property=\"article:published_time\" content=\"2018-05-31T16:18:49+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-12-12T22:54:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2018\/05\/github-to-b2-blue.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1440\" \/>\n\t<meta property=\"og:image:height\" content=\"820\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Roderick Bauer\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rodbauer\" \/>\n<meta name=\"twitter:site\" content=\"@backblaze\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Roderick Bauer\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"GitHub Backup Solutions: How to Back Up Your GitHub Data to Backblaze B2","description":"If you're using Github, you want to make sure that your hard work isn't lost. Learn how to back it up to the cloud.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.backblaze.com\/blog\/backing-up-github-to-cloud-storage\/","og_locale":"en_US","og_type":"article","og_title":"GitHub Backup Solutions: How to Back Up Your GitHub Data to Backblaze B2","og_description":"If you're using Github, you want to make sure that your hard work isn't lost. Learn how to back it up to the cloud.","og_url":"https:\/\/www.backblaze.com\/blog\/backing-up-github-to-cloud-storage\/","og_site_name":"Backblaze Blog | Cloud Storage &amp; Cloud Backup","article_publisher":"https:\/\/www.facebook.com\/backblaze","article_published_time":"2018-05-31T16:18:49+00:00","article_modified_time":"2025-12-12T22:54:29+00:00","og_image":[{"width":1440,"height":820,"url":"https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2018\/05\/github-to-b2-blue.jpg","type":"image\/jpeg"}],"author":"Roderick Bauer","twitter_card":"summary_large_image","twitter_creator":"@rodbauer","twitter_site":"@backblaze","twitter_misc":{"Written by":"Roderick Bauer","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.backblaze.com\/blog\/backing-up-github-to-cloud-storage\/#article","isPartOf":{"@id":"https:\/\/www.backblaze.com\/blog\/backing-up-github-to-cloud-storage\/"},"author":{"name":"Roderick Bauer","@id":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/#\/schema\/person\/ab76c78d649d9b862757dfa400d3cb8d"},"headline":"Backing Up GitHub to Backblaze B2","datePublished":"2018-05-31T16:18:49+00:00","dateModified":"2025-12-12T22:54:29+00:00","mainEntityOfPage":{"@id":"https:\/\/www.backblaze.com\/blog\/backing-up-github-to-cloud-storage\/"},"wordCount":553,"commentCount":4,"publisher":{"@id":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.backblaze.com\/blog\/backing-up-github-to-cloud-storage\/#primaryimage"},"thumbnailUrl":"https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2018\/05\/github-to-b2-blue.jpg","keywords":["B2","Developer","GitHub"],"articleSection":["Backing Up"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.backblaze.com\/blog\/backing-up-github-to-cloud-storage\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.backblaze.com\/blog\/backing-up-github-to-cloud-storage\/","url":"https:\/\/www.backblaze.com\/blog\/backing-up-github-to-cloud-storage\/","name":"GitHub Backup Solutions: How to Back Up Your GitHub Data to Backblaze B2","isPartOf":{"@id":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.backblaze.com\/blog\/backing-up-github-to-cloud-storage\/#primaryimage"},"image":{"@id":"https:\/\/www.backblaze.com\/blog\/backing-up-github-to-cloud-storage\/#primaryimage"},"thumbnailUrl":"https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2018\/05\/github-to-b2-blue.jpg","datePublished":"2018-05-31T16:18:49+00:00","dateModified":"2025-12-12T22:54:29+00:00","description":"If you're using Github, you want to make sure that your hard work isn't lost. Learn how to back it up to the cloud.","breadcrumb":{"@id":"https:\/\/www.backblaze.com\/blog\/backing-up-github-to-cloud-storage\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.backblaze.com\/blog\/backing-up-github-to-cloud-storage\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.backblaze.com\/blog\/backing-up-github-to-cloud-storage\/#primaryimage","url":"https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2018\/05\/github-to-b2-blue.jpg","contentUrl":"https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2018\/05\/github-to-b2-blue.jpg","width":1440,"height":820},{"@type":"BreadcrumbList","@id":"https:\/\/www.backblaze.com\/blog\/backing-up-github-to-cloud-storage\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Backing Up GitHub to Backblaze B2"}]},{"@type":"WebSite","@id":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/#website","url":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/","name":"Backblaze Cloud Solutions Blog","description":"Cloud Storage &amp; Cloud Backup","publisher":{"@id":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/#organization","name":"Backblaze","url":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/i0.wp.com\/www.backblaze.com\/blog\/wp-content\/uploads\/2017\/12\/backblaze_icon_transparent.png?fit=512%2C512&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.backblaze.com\/blog\/wp-content\/uploads\/2017\/12\/backblaze_icon_transparent.png?fit=512%2C512&ssl=1","width":512,"height":512,"caption":"Backblaze"},"image":{"@id":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/backblaze","https:\/\/x.com\/backblaze","https:\/\/www.youtube.com\/user\/Backblaze","https:\/\/en.wikipedia.org\/wiki\/Backblaze"]},{"@type":"Person","@id":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/#\/schema\/person\/ab76c78d649d9b862757dfa400d3cb8d","name":"Roderick Bauer","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/d0f9ff246abfe724e25d1c41983affb76e691cd3577d8b4d0d7607ee3ab6cbe2?s=96&d=blank&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/d0f9ff246abfe724e25d1c41983affb76e691cd3577d8b4d0d7607ee3ab6cbe2?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d0f9ff246abfe724e25d1c41983affb76e691cd3577d8b4d0d7607ee3ab6cbe2?s=96&d=blank&r=g","caption":"Roderick Bauer"},"description":"Roderick has held marketing, engineering, and product management positions with Adobe, Microsoft, Autodesk, and several startups. He's consulted to Apple, Microsoft, Hewlett-Packard, Stanford University, Dell, the Pentagon, and the White House. He was a Ford-Mozilla Fellow in Media and Democracy with Common Cause in Washington, D.C., where he advocated for a free, open, and accessible internet for all, reducing media consolidation, and transparency in politics and the media.","sameAs":["https:\/\/x.com\/rodbauer"],"url":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/author\/roderick\/"}]}},"jetpack_featured_media_url":"https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2018\/05\/github-to-b2-blue.jpg","_links":{"self":[{"href":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/wp-json\/wp\/v2\/posts\/83359","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/wp-json\/wp\/v2\/users\/133"}],"replies":[{"embeddable":true,"href":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/wp-json\/wp\/v2\/comments?post=83359"}],"version-history":[{"count":0,"href":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/wp-json\/wp\/v2\/posts\/83359\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/wp-json\/wp\/v2\/media\/83386"}],"wp:attachment":[{"href":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/wp-json\/wp\/v2\/media?parent=83359"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/wp-json\/wp\/v2\/categories?post=83359"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/wp-json\/wp\/v2\/tags?post=83359"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}