Changed 2013-04-29 18:50:53

Vhost tool

Vhost tool is a utility to help with various operations around cloning/copying web sites from one host/db to another. Source is at http://git.idrift.no/vhost-tool.git



  • vhost dbcp source target
  • vhost cp source target
  • vhost conf target
  • vhost rm target


Clone a database

For now, only supports cloning a named database from db1 to localhost


    vhost dbcp opusark


Clone a site

For now, only supports cloning a webhost from elendil to localhost


    vhost cp opusark.no


Configure a site

Will try and detect site type, and configure settings accordingly. Start with support for wordpress local-config to setup correct paths/URLs, database settings and nginx settings. Result URL will be opusark.no.dev.iwww.no


    vhost conf opusark.no


Remove a site

Not finished: Clean up after a copy. Remove target directory and database.