{"id":659,"date":"2022-04-27T13:38:16","date_gmt":"2022-04-27T05:38:16","guid":{"rendered":"https:\/\/play.datalude.com\/blog\/?p=659"},"modified":"2022-04-27T13:38:18","modified_gmt":"2022-04-27T05:38:18","slug":"digital-ocean-spaces-vs-restic","status":"publish","type":"post","link":"https:\/\/play.datalude.com\/blog\/2022\/04\/digital-ocean-spaces-vs-restic\/","title":{"rendered":"Digital Ocean spaces vs restic"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Very easy answer to a problem that's probably had you cursing for ages. When you set up a DO Spaces instance, you get a URL like https:\/\/myspace.eur3.digitaloceanspaces.com\/, where eur3 is the datacenter you're in and myspace is the space name you supplied. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So you just take that and append s3: to it in your restic config, don't you? Of course you do. Except you don't. That will just give you a weird client.BucketExists error. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So what it actually wants is this: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>s3:eur3.digitaloceanspaces.com\/myspace\/<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Or if you have created a subfolder, then use <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>s3:eur3.digitaloceanspaces.com\/myspace\/subfolder<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If you're scripting this and using environment variables,  your whole thing will look like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Digital Ocean API Key\nexport AWS_ACCESS_KEY_ID=THESHORTCAPSANDNUMBERSTRING\n# Digital Ocean API SECRET\nexport AWS_SECRET_ACCESS_KEY=Th3LongMix3dC4seString123213jkadfadsfasdadf\nexport RESTIC_REPOSITORY=\"s3:eur3.digitaloceanspaces.com\/myspace\/subfolder\"\nexport RESTIC_PASSWORD=\"SecretEncryptionPW\"\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">I hope this saved you some time, because I just spent a couple of hours trying to figure it out.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Very easy answer to a problem that's probably had you cursing for ages. When you set up a DO Spaces instance, you get a URL like https:\/\/myspace.eur3.digitaloceanspaces.com\/, where eur3 is the datacenter you're in and myspace is the space name you supplied. So you just take that and append s3: to it in your restic &#8230; <a title=\"Digital Ocean spaces vs restic\" class=\"read-more\" href=\"https:\/\/play.datalude.com\/blog\/2022\/04\/digital-ocean-spaces-vs-restic\/\" aria-label=\"Read more about Digital Ocean spaces vs restic\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[1],"tags":[134,85],"class_list":["post-659","post","type-post","status-publish","format-standard","hentry","category-it","tag-linux","tag-script"],"_links":{"self":[{"href":"https:\/\/play.datalude.com\/blog\/wp-json\/wp\/v2\/posts\/659","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/play.datalude.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/play.datalude.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/play.datalude.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/play.datalude.com\/blog\/wp-json\/wp\/v2\/comments?post=659"}],"version-history":[{"count":0,"href":"https:\/\/play.datalude.com\/blog\/wp-json\/wp\/v2\/posts\/659\/revisions"}],"wp:attachment":[{"href":"https:\/\/play.datalude.com\/blog\/wp-json\/wp\/v2\/media?parent=659"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/play.datalude.com\/blog\/wp-json\/wp\/v2\/categories?post=659"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/play.datalude.com\/blog\/wp-json\/wp\/v2\/tags?post=659"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}