How to do a SVN Dump from a remote repo

Found this great article on how to hack your way to do a SVN dump from a remote repo. I had never use the svnsync command but this allows you to make the remote repo a local one and you can easily use it to create your dump file. Very useful when you have lost admin access to the original server and you need to migrate to a new SVN server.

Quick command list:

  • svnadmin create temprepo
  • echo ‘#!/bin/sh’ > temprepo/hooks/pre-revprop-change
  • chmod +x temprepo/hooks/pre-revprop-change
  • svnsync init file://temprepo https://server/svn/origrepo
  • svnsync sync temprepo
  • svnadmin dump temprepo > dumpfile

Copy the dump file over to the new SVN server and on it:

  • svnadmin load reponame < dumpfile

A quick word of warning because the UUID will change with this process so doing “svn sw” on existing working copy might prove to be challenging.

Forwarding DNS Server

options {
directory “/var/named”;
forwarders {172.16.10.1; 172.16.10.2;};
forward only;
};

I had to setup a forwarding DNS servers today and since I had never done it before I was looking for a quick way.

I installed the bind rpm package that comes with RHEL5 and was puzzled since it did not create the /etc/named.conf. So I created one with this content:

options {
directory “/var/named”;
forwarders {10.1.1.1; 10.1.1.2;};
forward only;
};

Changed the ownership to named:named and started the service.
Quite simple and in our lab it is a simple way to address an issue with routes to access a DNS Server.

Host Mac Addresses on a Cisco Switch

I have to find where a server nic is connected in the network. I was certain there was a way to know what mac address was on which port but I needed Google to find a good article to show me how to get that information.

Once on the switch you can simply execute:

sh mac address-table

to see all the mac addresses the switch is aware of but when you are looking for a specific mac address you can execute this:

sh mac-address-table address 0011.bbcc.ddzz

Very simple and very convenient if I could only find the nic somewhere.

Ref.: http://www.itsyourip.com/cisco/howto-find-switchport-for-a-mac-address-on-a-cisco-catalyst-switch/

Code kata

Until I followed a link from a twitter friend I had never heard of this term.

As a small time programmer I am always looking for ways to improve the code that I do and I also look at ways to improve myself as a programmer. Code kata is certainly a generic approach at these goals that is worth reading about.

Not everything they propose I will be able to try right away. It all depends on your environment.

It is more than just practicing at solving specific coding puzzle. It is about learning the tools that you use, communicating with the people that are around you, reading code that others do and try to maintain it, getting code reviews and much more.

I have to sit down and write what I will do to improve my programming ways. What I think easily make sense and that I can do rapidly:

  1. read about new features in Eclipse
  2. read about codig algorithm in Java
  3. learn Python
  4. I have to ask a programmer at work to review some of my code

If I can get those done in the next month I will see some improvement for sure.