How to Restore Backups from Amazon S3 through SSH - Solved


I have the backups configured correctly and they are backing up to S3 but I am trying to restore an account that got deleted by whmcs. 

I goto Backup Restoration and none of my accounts are listed and the date selectors are not displaying any valid date range choices. 

I also am having issues logging in ssh I get the following error "Permission denied (publickey,gssapi-keyex,gssapi-with-mic)."

So as a temporary solustion I have logged into the clients newly re-created cpanel account used the backup restore wizard and uploaded the .tar.gz file from the downloaded version on S3. 

I guess its a long way to work around this but will this single upload restor mysql, email and directory contents or will I have to upload 3 versions of the file because I had three option on the restore. 

Thanks in advance for any help just trying to get this handled before the client wakes up in the morning and sees his ecommerce site is down.

- - - Updated - - -


Files just finished uploading and of course I get 
[an error occurred while processing this directive]

Take a look at s3cmd. It's pre-packaged for most distributions. For example, on CentOS 6:
sudo wget -O /etc/yum.repos.d/s3tools.repo
sudo yum install s3cmd
s3cmd --configure
It's a great tool for working with Amazon S3, and I've used it in a number of cases where I needed to automate the handling of a bunch of files.

After Installing it Run the following command to configure s3cmd as:

s3cmd --configure

so you must configure your s3cmd and you will be done to download directly from amazon using the following command.

s3cmd get "s3://$s3_bucket_name$s3_prefix/$1/$2.tar.gz"

Post a Comment