docs: def restore(backup_file):
      '''
          Restore a Cozy
          backup_file: path to .tar.gz
      '''
      if not os.path.isfile(backup_file) and not os.path.islink(backup_file):
          print 'Missing backup file: {}'.format(backup_file)
      else:
          couchdb_path = _get_couchdb_path()
  
          print 'Restore Cozy:'
          cmd = 'supervisorctl stop cozy-controller ; sleep 10'
          cmd += ' ; service couchdb stop ; service nginx stop'
          cmd += ' ; rm -rf {couchdb_path}/.cozy_design'
          cmd += ' {couchdb_path}/_replicator.couch'
          cmd += ' ; tar xvzf {backup_file} -C /'
          cmd += ' ; service couchdb start ; service nginx start'
          cmd = cmd.format(backup_file=backup_file, couchdb_path=couchdb_path)
          helpers.cmd_exec(cmd, show_output=True)
          helpers.wait_couchdb(10)
          cmd = 'supervisorctl start cozy-controller'
          helpers.cmd_exec(cmd, show_output=True)