New Droplet with Backup from other Host (e.g. Media Temple)

July 7, 2016 389 views
DigitalOcean Deployment Ubuntu

We've got a few sites that were created and managed by an outside firm and are each on a Media Temple VPS. We'd like to manage them ourselves on Digital Ocean. I know we could manually move sites over to newly created droplets, but I'm wondering if there is an easy way to make up backup at Media Temple (I don't currently have access to that account as it's managed by them) and create new droplets with those images, then just point the nameservers to DO, set up DNS and we're done.

Or I saw somebody on another thread mention the possibility of using rsync to copy the whole file system (assuming they're both running the same distro/version). Anybody done that before?

7 Answers
ryanpq MOD July 7, 2016
Accepted Answer

We do not currently provide a method to import or export disk images or backups. The two methods you mentioned (manual or rsync) would be viable options. If you choose to use rsync to do the transfer it may be easier to only transfer specific directories rather than the full filesystem. What software and services are you running on your current VPS?


Using rysnc is one way, if you have SSH access, though without it, you wouldn't be able to use it. As the websites are being managed by a third-party, I would simply ask them to create a backup of each website and provide them for download. From there, you could simply use wget to pull the backups from the URL provided to the Droplet and then extract each archive, move the data to each preferred directory and ensure that proper permissions are setup (i.e. you don't want to run accounts under root, each account should be ran as its own user).

Using wget from your Droplet is as simple as:

wget http://domain.ext/backup.tar.gz

Then, create a few home directories, one for each account:

mkdir -p /home/username/{public_html,logs,private}

Download the archive:

cd /home/username/public_html \
&& wget http://domain.ext/backup.tar.gz

Extract the Archive:

cd /home/username/public_html \
&& tar xzf --strip-components=1 backup.tar.gz

Then, to ensure proper permissions, create a new user:

useradd -d /home/username username

Then chown the directories and files to that user (chown = Change Ownership):

chown -R username:username /home/username

You could then use a tool, such as Adminer or phpMyAdmin, to restore database backups (just as you could use them to download backups on your current servers). You would need to install it as well, though Adminer is a single file and far less complicated than phpMyAdmin. With it, you simply download a single file from the URL below and access it as you would any normal PHP file (via URL), though you'll want to either restrict access to it, or only upload it as needed as it's not really a best-practice to leave open access to something that could be used to gain access to your database.

Thanks for the reply. One is a simple Wordpress site (I found another forum post about that), but I'm not sure about the others, which is why I was hoping for a one-size-fits-all solution. Wishful thinking, I guess.

Thanks for the info, it's very helpful. I think I'm going to ask them to give us ownership over the existing VPS's so I can get SSH access and decide where to go from there.


As a word of precaution, it should be kept in mind that DigitalOcean isn't a managed provider. When it comes to server setup, security and maintenance, you're on your own.

Simply deploying a one-click WordPress install or setting up NGINX, PHP-FPM and MySQL isn't going to provide security for your server or hosted websites. You'll need to know how to go about setting up proper security measures to ensure that requests to your server are handled or rejected (which can be done, for starters, with a firewall), and you'll need to lock down SSH, maintain updates & upgrades (to the OS and the software used by the OS) in addition to WordPress, and a great deal more.

I'm throwing this out there as too many deploy a VPS thinking that all that goes in to running a website outside of a shared hosting environment is simply setting up a new site and running with it. When it comes to shared hosting, the web hosting provider is handling this for you. On a managed VPS, or a VPS managed by a third-party, they should be managing this for you.

With a Droplet on DigitalOcean, or any unmanaged provider, you're on your own and the CLI is your new best friend :-). Failing to properly secure and maintain security will, eventually, result in a case where you're wondering "what just happened....." -- I've seen it happen more times than I can count in the past 16 years.

Appreciate the warning. Security is part of the reason we're actually trying to get control of all our disparate services. The firm that handled it before is a small local design studio, more creatively minded than technical. We've already got a few Droplets on DO with the appropriate precautions (firewalls configured, ssh key pairs, disabled root account, etc). I'm no expert, but I've got one backing me up. I'm already way more comfortable with Linux and the CLI than I was a year ago. Still got a lot to learn, though.

  • @mattmaddux

    Awesome! I normally leave such a note to those, not in an attempt to deter them from using a provider such as DigitalOcean, but to ensure that they know what they're getting in to. Many who are new to VPS's and root-enabled environments make the assumption that they too will function like that of a shared environment (which often comes bundled with cPanel, Plesk or another alternative control panel), which it's so far from actuality.

    If anything, I wish more users would take to DigitalOcean, learn how to manage their own servers and enjoy the true benefits that come with it.

    I've been with DigitalOcean since the early days -- looking at the first invoice, it's from July 31st, 2012, so almost 4 years now and in those 4 years, I've experienced (and this is fact) 99% fewer issues than I would have had I chosen another provider.

    Downtime has, to date, never been an issue. Service has been stellar and superb and above all, my interactions with the team have been a pleasure, so I think you're making a very wise decision, one of which I hope you'll enjoy as much as I have over the years!

    As a side note, if you need help, just ask. I'm more than happy to help and would be more than happy to help you get things straightened out.

Thanks for the offer. And yeah, everybody needs to know exactly what they're getting into.

When setting up my first VPS I was torn between DigitalOcean and Linode, but ended up jumping in with DO on a lark. So far I'm loving DO and I'm happy with my choice. And having opened up the world of Virtual Private Servers I'm having fun thinking of things to do now, both at work and at home.

Have another answer? Share your knowledge.