Sunday, February 8, 2009

A glimpse of rsync

As a person, I am very impatient as far as my work is concerned. I want to do things superfast and in the process end up being completely screwed. I have already mentioned this over and over again. This is 21st century. India had its successful moon mission last year viz. Chandrayaan. We are technically so capable, still we are so used to committing the same mistakes again and again. Shame on us! I wanted to improve on something to avoid the daily mistakes that we do.
In my project, we have continuous integration in place. So everything runs automatically ( periodically) and all you have to do is, sit back and analyze the reports you get in the mail. You can decide when the automatic scripts should run. It can be when someone updates the files, or at a fixed time everyday. We use SVN repository for our code base. However, there are many things that we maintain in our system which has no direct relevance to the code and is not backed up automatically. We use multiple frameworks for testing. If I find a fault in the code, it has to be rectified and it should work fine with all other tests too. So we can't check-in the code based on one test alone. It may take several weeks to finish the tests and its really risky to maintain only a local copy of the code. Similarly, you can be testing some tools if they suit your work etc. which can go on for some time. From my experience, it is very difficult to create a build environment from the code in the repository. It is something that you would require daily for doing your tests and stuff, however there is no place for it in the repository. What do you do in such cases ? rsync is the utility that you are looking for. Let's have a look how you can use this tool to take regular backups.
Another issue is when you are trying to copy large files through scp and the transfer gets interrupted, you have no other option, but to keep trying. I found some tutorials on the internet which I followed blindly to setup the working backup system. Have a look at this, this, this and this.

No comments: