21 March 2011

Migrate Subversion repository

Posted: March 21st, 2011 | Author: Jon | Filed under: System Administration | Tags: , , | No Comments »

I needed to migrate an existing Subversion repository to a new server today, here’s how I did it:

1. Dump your existing Subversion repository to a compressed file.

svnadmin dump /path/to/repo | gzip > /tmp/repo.svn.gz

2. Transfer the compressed file to the new server.

scp /tmp/repo.svn.gz user@server:/path/to/

3. Create a new Subversion repository on the new server.

svnadmin create /path/to/repo

4. Decompress the repository dump file and import it into the new Subversion repository.

gzip -cd /path/to/repo.svn.gz | svnadmin load --force-uuid /path/to/repo

Notes:

  • The dump command will also allow you to switch between BDB or FSFS back end types (link).
  • The –force-uuid option should allow you to switch any checked out projects to the new Subversion repository location.

22 September 2010

Asprox botnet SQL Injection attack

Posted: September 22nd, 2010 | Author: Jon | Filed under: System Administration | Tags: , , , | No Comments »

I stumbled across this article by the The Inquirer the other day on the SQL injection attacks by the Asprox botnet. An old classic ASP site of mine actually got hit back in 2008 by it and it looks like it’s still doing the rounds now. Here are some links I found useful at the time including a script I used to help me clean up the infection:


18 July 2010

How to generate stats for IIS log files using Webalizer

Posted: July 18th, 2010 | Author: Jon | Filed under: System Administration | Tags: , , , , , , | No Comments »

While sorting through some of my many backups of old machines I came across a whole load of IIS log files for an old site of mine so I thought I’d process them and generate some statistics. I’ve used Webalizer quite a few times before for generating stats on Apache log files and as v2.01 is available via Synaptic Package Manager in Ubuntu I thought I’d use this.

Unfortunately v2.01 doesn’t support support the W3C format that IIS uses, looks like it does now in v2.20 though. However IIS includes a utility called ‘convlog‘ for converting it’s logs files to the NCSA common log file format that Webalizer does support. So I fired up my old Windows XP box, installed IIS and used the following command to convert the log files:

convlog -ie ex*.log

Once that had processed all the log files (by default it creates a copy of each log file) I copied them back to my Ubuntu laptop and used ‘cat‘ to combine all the files into one big log file:

cat ex*.nsca > master.log

All that was left to do was create a config file to tell Webalizer what it should do, so I copied the default config file and customised the options to my needs. Then ran ‘webalizer‘ using the customised config file:

./webalizer -c master.conf

Once it’s performed it’s magic you should have a bunch of detailed reports in the location you specified in the config file!


31 December 2008

AVG 8 LinkScanner

Posted: December 31st, 2008 | Author: Jon | Filed under: System Administration | Tags: , | No Comments »

While I’m on the subject of AVG 8 this one has been bugging me for a while now. If you don’t want AVG 8 LinkScanner putting annoying little green stars next to your web search results then you can disable the LinkScanner component in the AVG UI. However this causes AVG to show you a nice big error icon in the systray area.

I spent ages trying to stop it from doing this when AVG 8 first came out but couldn’t find an option anywhere. Looks like a recent update has resolved this as you can now right click on the LinkScanner component and select the ‘Ignore component state’ option to stop AVG reporting the fact that you’ve disabled it as an error!

AVG 8 – Invalid update control CTF file

Posted: December 31st, 2008 | Author: Jon | Filed under: System Administration | Tags: , , , | 1 Comment »

For a few days now AVG Anti-Virus Free 8 has been complaining about it’s database being out of date. When I’ve tried manually running the update feature I get the following error:

“Invalid Update Control CTF File”

I finally got round to doing something about this yesterday, I did a quick scan for all .CTF files and found a couple in:

C:\Documents and Settings\All Users\Application Data\avg8\update\download

I deleted the .CTF files in this folder (I left the .BIN files alone) and tried running the update feature again. Ran without a problem this time and downloaded an definitions update fine.

I’ve got no idea how AVG got itself into this state but it was simple to fix. I’m running Windows XP by the way, the location of the files may be different on Windows Vista.