Backup to Digital Ocean Spaces?

reholmes27

Member
Aug 31, 2014
8
3
53
cPanel Access Level
Root Administrator
I'd like to use a Digital Ocean Space to backup my accounts to but I can't find a solution for this. I've set up the space, which is very much like Amazon S3, and I can connect to it using the Amazon S3 protocol in an application such as CyberDuck.

When I try to connect to it using the Amazon S3 option in the backup configuration it fails. I can only assume the S3 path is hard coded in the configuration somewhere? I've tried creating a custom transport option but I don't know what I'd need to put in the transport script for it to work.

Any advice gratefully received.

Thanks.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,903
2,237
463
Hello,

The Amazon S3 destination type is designed specifically for Amazon S3 destinations. I recommend consulting with your provider to determine which services are supported with the backup service they offer. For instance, you might be able to simply use a destination type such as rsync or SFTP if it's a standard linux-based server.

Thank you.
 

reholmes27

Member
Aug 31, 2014
8
3
53
cPanel Access Level
Root Administrator
Hello,

The Amazon S3 destination type is designed specifically for Amazon S3 destinations. I recommend consulting with your provider to determine which services are supported with the backup service they offer. For instance, you might be able to simply use a destination type such as rsync or SFTP if it's a standard linux-based server.

Thank you.
Thanks for your reply.

It's not a linux based server, it's just storage space accessible via an S3 connection so rsync and SFTP are not available. Can you tell me where to find the configuration file for the Amazon S3 destination as I may be able to use it to set up a custom destination, changing the S3 URL and any other settings?

Thanks
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,903
2,237
463

reholmes27

Member
Aug 31, 2014
8
3
53
cPanel Access Level
Root Administrator
Thanks Michael, very useful.

If I edit that file and add a host attribute, with a value of ams3.digitaloceanspaces.com, into the Amazon::S3->new call I can get it to connect to the Digital Ocean S3 storage space.

I've edited the AmazonS3.pm file though so it may get overwritten in a future update, however, it works for now. Can I suggest you add in the option for a host to be entered into the Amazon S3 configuration and that would be all it needs.

Thanks

Rich
 
  • Like
Reactions: Chirag Jain

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,903
2,237
463
Hi Rich,

I'm glad to see that worked. You can open a feature request if you'd like to see additional functionality added to the existing Amazon S3 backup destination type:

Submit A Feature Request

Also, if you are wanting to ensure changes to that file are preserved through updates, you could setup a post upcp hook similar to how it's done on the following thread:

HELO name problem on roundcube

Thank you.
 

brt

Well-Known Member
Jul 9, 2015
104
10
68
US
cPanel Access Level
Root Administrator
I don't plan on using Digital Ocean Spaces specifically here, but there are so many S3-compatible services out there that it only makes sense to have the S3 backup configurable instead of hard-coded to just the actual Amazon S3.

For backup purposes, S3 pricing would be insane.
 

mega023

Member
May 20, 2005
9
1
151
Hello,

I'm not sure how helpful this will be, but you can review our Amazon S3 transport file at:

Code:
/usr/local/cpanel/Cpanel/Transport/Files/AmazonS3.pm
You may also find the following document helpful:

How to Create a Custom Transport Script for Backups - cPanel Knowledge Base - cPanel Documentation

Thank you.
Yes that seems to be possible by modifying that file:
geektnt.com/how-to-backup-whm-cpanel-accounts-to-digitalocean-spaces.html
But are there any plans to make possible using S3-compatible service (so I could use Wasabi.com)?
 
Last edited by a moderator:
  • Like
Reactions: ylluminate

ylluminate

Member
Apr 12, 2013
16
2
3
cPanel Access Level
Root Administrator
Yes that seems to be possible by modifying that file:
geektnt.com/how-to-backup-whm-cpanel-accounts-to-digitalocean-spaces.html

But are there any plans to make possible using S3-compatible service (so I could use Wasabi.com)?
Same here, need to be able to use services like Wasabi or DreamHost. This would be a quick and simple alteration for cPanel to add this functionality.

See FEATURE REQUEST: Custom S3-compatible backup locations
 
Last edited by a moderator:
  • Like
Reactions: cPWilliamL

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,903
2,237
463
Hello,

We are tentatively planning to add support for S3 compatible storage providers (other than Amazon) as backup destinations in cPanel & WHM version 74. Please feel free to watch the following feature request for updates:

Custom S3-compatible backup locations

Thank you.