OpenVZ Forum


Home » General » Support » Sync'ing between servers
Re: Sync'ing between servers [message #385 is a reply to message #380] Sat, 19 November 2005 19:35 Go to previous messageGo to previous message
youp is currently offline  youp
Messages: 82
Registered: September 2005
Location: Belgium
Member

i use virtuozzo and synchronise by crontab in the night ...

i use this script for that :

#!/bin/bash
set +x
date=`date '+%y%m%d%H%M%S'`

VMRUN=`/usr/sbin/vzlist | grep running | grep $IP | wc -l`

if [ $VMRUN == "1" ]; then
/usr/bin/rsync -avz --delete -e ssh /vz/private/$VZ/root/ root@$DESTINATION:/vz/private/$VZ/root/ > /allitscript/logTFT/$VZ-$date.log
fi

if the primary server failed :

i will start the VPS the backup server with this command :

mv /etc/sysconfig/vz-scripts/$VZ.conf.stdby vers /etc/sysconfig/vz-scripts/$VZ.conf

vzctl set $VZ --disabled no --save

vzquota drop $VZ
vzctl start $VZ

it's work great Wink


 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: debian sarge
Next Topic: VPS template for Redhat Enterprise Linux 4
Goto Forum:
  


Current Time: Fri Jul 26 18:44:22 GMT 2024

Total time taken to generate the page: 0.03243 seconds