Monday, 12 November 2007

Backup-Restore ipcop

The Backup and Restore idea is always running in my head since I plan to have a long visit to Thailand. We have tried to swap gateway and make the connection works in not more than 2 minutes, that is very satisfied me. I try to make the similar box as a backup to offer a back up if there is unexpected crash happen with our current machine. We are running iPcop 1.4.16 + advanced proxy with dhcp server enable, on PII 400 Mhz/128 Mb Ram/6 GB HD that come from donation from a lay supporter. It handles 30 computers traffic in the reasonable speed, and it help a lot in preventing our router to crash.

The previous backup method is works but not all the time. I have found another solution by the method that I familiar: rsync.

Here what I did:

The first thing I know is that iPcop keep configurations in /var/ipcop what I did merely copy that folder somewhere

Backup
1. Down load and install rsync and openssh from http://www.ipadd.de
2. Copy it to iPcop by scp -P 222 rsync.tar.gz root@ipcop:
3. Remote login to iPcop ssh -p 222 root@ipcop
4. extract rsync269.tar.gz tar -xzvf rsync.tar.gz it will have the new folder called rsync
5. Change directory to rsync cd rsync
6. Install ./install -i (./install -u for uninstall)
7. Install openssh in the similar way
8. Test rsync by getting file from iPcop from my local machine rsync -avlopug -e 'ssh -p 222' root@ipcop:/var/ipcop . (rsync is getting file from root@ipcop:var/ipcop and copy to my current folder on my local machine.)

That is my first time that I be able to use rsync with iPcop

Restore to another machine

1. rsync the file I need to ipcop:var/ipcop by rsync -av ipcop/dhcp/fixleases -e 'ssh -p 222' root@ipcop:/var/ipcop/dhcp/

In my case I need only where I need to put information which are ipcop/dhcp/fixleases and folder ipcop/proxy/advanced other file let reinstall ipcop it would be better but if I restore to the old machine I will restore folder ipcop/ethernet too.

The join of be able to do what I want to do is alway make my hair stand. It also very easy for me to feel joyful when other do a good thing. Sometimes one doesn't know how much appreciated that friend feel from a simple thing that one has done for fro friend such as keep the cloth that hang outside when it is raining, washing a friend coffee cup that left on the sink. Not every one bother to do so. I, myself manage to feel the join in both doing and receiving. I quite please with this simple joy that I was never pay any attention before I became a monk.

The appreciation of receiving and giving can turn be opposite as well. Especially when I receive something from someone whit the appreciation feeling but later I head the complain with regret I usually stop using that thing by keeping it in the monk's store room or anything I can return with out make any bad feeling for both I do return. The complaint doesn't come so often but it usually come from the one who always says "I never complain" before doing or offer things, that sounds funny but it is true.

No comments: