How do I restore a backup from Linode Object Storage bucket?

Linode Staff

I have a backup in my Object Storage bucket, but I am not sure how to restore it. Can I please get some help?

1 Reply

Using "s3cmd get" and/or "s3cmd sync"

If you haven't used s3cmd yet, you'll first need to install it:

After working through the section on configuring s3cmd, you'll need to manually edit your .s3cmd configuration file (located under /home/$USER/) and replace the host_base, host_bucket, and website_endpoint with those for your Linode. Instructions for doing this are outlined here:

Once s3cmd is installed on your Linode, you can restore all of the files in your bucket, or particular files using s3cmd get:

I just tested this out on my Linode, and the syntax is the same as what's in the guide:

s3cmd get --recursive s3://bucket/path destination

For example:

s3cmd get --recursive s3://my_bucket obj_restore_directory

Additionally, the sync command looks like it would also be a good options. This is from s3cmd --help:

Synchronize a directory tree to S3 (checks files freshness using size and md5 checksum, unless overridden by options, see below)
s3cmd sync LOCAL_DIR s3://BUCKET[/PREFIX] or s3://BUCKET[/PREFIX] LOCAL_DIR

I tested this out as well using:

s3cmd sync s3://my_bucket ~/obj_restore_directory/

The sync command may be a better option if you want to restore everything, whereas, the get command may be a better option if you want to target specific files.

Here are some additional resources that may useful:

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct