How do I restore a backup from Linode Object Storage bucket?
I have a backup in my Object Storage bucket, but I am not sure how to restore it. Can I please get some help?
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
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
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
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
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: