One-click migrations

In the spirit of one-click installs, I suggest a project to find the most elegant scripts for one-click website-migration. These would be of the form, where X is one host and Y is another host, and would take as parameters such things as account identifiers, passwords, api keys, and domain names.

It would be good to have scripts for going both to and from Dreamhost. Then on a Friday evening (for example) one could click on Dreamhost2X, and (allowing the weekend for DNS propagation) on Monday morning the website would be fully functioning on host X; then, the next Friday evening, one could click on X2Dreamhost, and on the following Monday the website would be fully functioning back on Dreamhost.

This would provide welcome flexibility in our website management and planning.

For static websites, automating Dreamhost2X turns out to be quite straightforward (for good choice of X) but the Dreamhost api seems to be missing some crucial bits needed for automating X2Dreamhost:

for example, while there is a way of adding dns records (not that I’ve tried it yet), there seems to be no way of adding domains and/or subdomains

(nor indeed a way of adding users, which would be highly desirable since one generally wants to add a fresh domain onto a fresh user).

Surely there must be a way of doing this? It’s hard to believe that nobody has ever moved a domain to Dreamhost in an automated way.

Suggestions welcome!

(Also missing is a way of updating nameserver info, but a simple workaround is to keep one’s registrations somewhere else that does have this functionality, which is anyway an often-recommended course for various reasons.)