Hi All
This is a script we have been using for a long time to move vserver guests.
Hopefully this might help
Mike
> I've found it useful to use the --numeric-ids switch on rsync when you
> moving the guests data.
#!/bin/bash
VS=$1
DST=$2
# Syncing ${VS} guest directory to ${DST}
rsync --delete -aPSvx --numeric-ids /vservers/$VS/* root@$DST:/vservers/$VS
# Copying ${VS} config to ${DST}
rsync --delete -aPSvx --numeric-ids /etc/vservers/$VS/*
root@$DST:/etc/vservers/$VS
# Syncing ${VS} guest directory to ${DST}
rsync --delete -aPSvx --numeric-ids /vservers/$VS/* root@$DST:/vservers/$VS
# Syncing ${VS} guest directory to ${DST} again
vserver ${VS} stop
rsync --delete -aPSvx --numeric-ids /vservers/$VS/* root@$DST:/vservers/$VS
ssh root@$DST "echo default > /etc/vservers/$VS/apps/init/mark"
echo none > /etc/vservers/$VS/apps/init/mark
ssh root@$DST "vserver ${VS} start"
Received on Sat Nov 9 08:10:30 2013