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 config, don't you? Of course you do. Except you don't. That will just give you a weird client.BucketExists error.
So what it actually wants is this:
Or if you have created a subfolder, then use
If you're scripting this and using environment variables, your whole thing will look like this:
# Digital Ocean API Key
# Digital Ocean API SECRET
I hope this saved you some time, because I just spent a couple of hours trying to figure it out.