Monday, May 20, 2013

Mirroring CVS server to a backup server


The last step in setting up CVS is to set up the mirror server for disaster recovery, when there are any unexpected event happen, then we can switch to the mirror server immediately without affecting our development.
Steps: 1. create rsync script in the CVS mirror server
  • Install rsync if not already installed
  • write the following rsync script and save it in mirror-cvs.sh
  • rsync -vaz --delete [source-server-ip]:[/path/to/cvs/repo] [/local/path/to/cvs/repo]
2. schedule the rsync script every 30 minutes with the following script
*/30 * * * * /path/to/script/directory/mirror-cvs.sh
for more information about cronjob, please refer here.

3. setup ssh to login without passwd
  • create public and private keys with the following script
ssh-keygen
  • copy the public key to remote host with the following script
ssh-copy-id –I ~/.ssh/id_rsa.pub remote host

Done!!

LinkWithin

Related Posts Plugin for WordPress, Blogger...