Cannot set vertex group to active with python while in background mode?
For me it's not the operator that sets the active vertex group that fails, but the vertex group select. The reason is that the object needs to be in edit mode in order to run it:

import bpy
vgroups = bpy.context.object.vertex_groups
vgroups.active_index = vgroups["Group"].index
bpy.ops.object.mode_set(mode="EDIT")
bpy.ops.object.vertex_group_select()


You may also select the relevant vertices without operator:

import bpy

ob = bpy.context.object

vi = ob.vertex_groups.find("Group")

for v in ob.data.vertices:
    for g in v.groups:
        if g.group == vi:
            v.select = True


... but it only works in object mode. To transform the selection, you need to switch to edit mode or write a low-level replacement (requires object mode):

import bpy
from mathutils import Vector

ob = bpy.context.object
me = ob.data
vi = ob.vertex_groups.find("Group")

verts = [v for v in me.vertices for g in v.groups if g.group == vi]
center = sum(map(lambda v: v.co, verts), Vector()) / len(verts)

for v in verts:
   v.co = (v.co - center) * 2 + center