Carl’s Blog

Computer Stuff

Using Rsync to backup SCO OpenServer, Mac OS X, and Windows Server 2003

by Carl Farrington on Jan.13, 2009, under Tips & Tricks

Today I had to knock together a backup solution for a small company who have a very old SCO OpenServer 5.0.5 machine running some bespoke application, a Windows SBS 2003 machine running the usual, and a Mac OS X machine running err, OS X Tiger, all backing up to a USB hard disk on the director’s Windows XP computer.

I decided to use Rsync from the Samba people. It sounded good, but I had a lot of problems along the way with Rsync protocol errors between the SCO box and the XP machine. These problems mostly went away when I changed to using the rsync.exe provided in the Deltacopy package, rather than the one provided in the cwRsync package.

The backup script that I created is found below. It requires Devcon which you can find on Microsoft’s website with the help of Google. The “devcon remove” string at the bottom of the script will probably need the USB\VIDxxxx string changing to reflect that of your USB drive. Check in the details tab of Device Manager on the USB Mass Storage Device to see what the VID ID is. Leave the asterisk (*) at the end in the devcon remove line.

The clever part, in my opinion, of this script is that it will search for the USB hard drive and identify which drive letter has been assigned. Therefore, if the drive is usually assigned G:, but happens to be assigned H: for some reason (incorrect removal of the USB drive leaving a ghost G:  for example), then the script will still work. It does this by looking for a file named drvid.txt on the USB drive, so make sure you create that file on there. I had to make the script call itself in order for the for loop to work on the drvid part. For some reason using “if exist” with a colon, e.g. “if exist f:\drvid.txt” within a for loop is not possible within a batch file, but is possible from the command-line directly. Weird.

You will of course need to have rsync on the Windows machine. I downloaded Deltacopy (after struggling with cwRsync) and simply copied all the files from the Deltacopy directory into c:\windows\system32

What the script doesn’t do is character set conversion from the Mac. This is something I need to look into, as the Mac allows weird filenames, even asterisks in folder names, which of course poses quite a problem.

Also note the drive letter list within the brackets of the for loop. I have intentionally ommited some drive letters, those assigned to network drives and card readers. You will want to populate this properly, perhaps everything from E to Z.

Anyway, here’s the script, or you can download at http://www.css-networks.com/RsyncBackup.cmd

@echo off
SET CYGWIN=nontsec
if %1.==. goto noparams
goto drvid

:noparams
Echo Scanning for external HDD.
devcon rescan
ping localhost -n 30>NUL

for %%a in (g h j k l n o p q u r s t v w x y z) do call %0 %%a

:drvid
if exist %1:\drvid.txt goto found
goto end
:found
Set DRVID=%1
echo Drive found as %DRVID%:
ping localhost -n 30 >NUL
:doeric
Echo.
Echo Rsyncing SCO (Eric) Machine
rsync -avz 192.168.1.2::root /cygdrive/%DRVID%/Eric/
:doserver
echo.
Echo Rsyncing Windows Server Data
rsync -azv “192.168.1.1::Network Shares” /cygdrive/%DRVID%/Server
:dosimon
echo.
Echo Rsyncing Simon’s Data
rsync -azv “192.168.1.11::documents” /cygdrive/%DRVID%/Mac/Documents
rsync -azv “192.168.1.11::250gb” /cygdrive/%DRVID%/Mac/250gb
:remove hdd
Echo.
Echo Peparing external HDD for removal
devcon remove USB\VID_152D*
ping localhost -n 30>NUL
pause
:end

2 Comments more...

Rsync: unexpected tag -7

by Carl Farrington on Jan.13, 2009, under Tips & Tricks

I encountered this problem when trying to back up a SCO OpenServer 5.0.5 box to a Windows XP machine using Rsync 3.0.5 on the SCO box and cwRsync (3.0.5) on the Windows machine.

Having tried all sorts, I eventually changed the Windows side to using the rsync 3.0.4 that comes with Deltacopy instead of using cwRsync.

I then ran into a different problem: “Integer overflow – attempted 64 bit offset
rsync error: requested action not supported (code 4) at ../io.c(381)”

This seems to have gone away after I returned to rsyncing the whole filesystem rather than just a subdirectory.

Leave a Comment more...

Blackberry Professional Server for Exchange quick setup.

by Carl Farrington on Dec.10, 2008, under Computer Stuff, Tips & Tricks

If the machine already has SQL Server or SQL Express on there, the BPS installer will not automatically create an SQL instance. You can either use an existing instance (i.e. tell the installer to create the Blackberry database on the SERVER\SHAREPOINT instance), which may confuse other sysadmins later and result in accidental removal of the Blackberry database, or you can install SQL 2005 Express yourself manually, which is what I do. It’s in the tools folder after you have extracted the BPS archive. Deselect “Hide Advanced Configuration Options” during the SQLEXPR install, and name the instance something useful like “BLACKBERRY”. You do not need User-Instances enabled.

Here’s the quick setup guide that I wrote after watching the videos. The written install guide is rotten. It makes a simple process look so tough:

Add user BPSAdmin, create Exchange mailbox.
Add to group Administrators (if you forget this you’ll know about it later when you’re unable to logon to the server locally as BPSAdmin).

Active Directory Users & Computers -> View -> Advanced Features
Domain Properties -> Security -> Advanced -> Add BPSAdmin -> Apply onto: User Objects -> Send As

Regedit: HKCU->Software->microsoft->Exchange->ExAdmin-> New DWORD ShowSecurityPage=1
Exchange System Manager -> Right-click Org -> Delegate Control -> Next -> Add BPSAdmin -> Exchange View Only Administrator
Right-click Org -> Properties -> Security -> BPSADmin -> Allow Administer IS, Receive As, Send As.

Log off.

Log on as BPSAdmin

Start BPS setup, accept all defaults, enter the BPSAdmin password.

Set up device as usual – Options -> Advanced Options -> Enterprise Activation.
When entering the email address, use space bar instead of @ and dot.

10 Comments more...

Fedora 10 is out today

by Carl Farrington on Nov.25, 2008, under Computer Stuff, Uncategorized

Fedora 10 is released at 10am Eastern US time. That means 15:00 in the UK. Only five and a half hours to go.
As far as I know AMD/ATI still haven’t released drivers for X Server 1.5 (X.Org 7.4), which is a shame because for now I would avoid any laptops with nVidia GPUs due to all the apparent failures with many different brands of laptop. I wonder if the new aluminium MacBooks will suffer GPU failures too? Anyway, my desktop here is using an nVidia graphics card so all is well with me.

Leave a Comment :, more...

ASUS EEE PC 701 mouse button click repair

by Carl Farrington on Nov.22, 2008, under Computer Stuff

The left mouse button on this EEE PC 701 no longer clicks. It still works, if you press very hard, but there is no feedback from the button and it’s very horrible almost totally unusable.

I took the machine apart to see what the microswitch looks like, and then started searching online for a replacement. I didn’t find an exact replacement in the UK, but I thought I would take a chance on a similar looking item from Rapid Electronics. This is the part that I bought: http://www.rapidonline.com/Electronic-Components/Switches/Push-Button-Switches/Sealed-push-switch/30249

First, the reason why the switch/button is broken is because of this little convex contact pad/disk, which is supposed to click as it flexes to make contact inside the switch. In this case, the disk has a hairline fracture that you cannot see in the photo. That’s why it doesn’t click.

The hardest part for me was removing the old microswitch. In the end I decided to just cut the legs, and then use the soldering iron to take off what’s left of the legs from the contact pads of the PCB. My solder sucker (desoldering pump) is useless on this surface mount stuff.

Here is the original switch on the left (after removal, so looking a bit bashed!), next to the replacement switch on the right. You can see that there is a difference in the profile, and the button on the replacement switch does not protrude like on the original. I was worried that there would be a difference in travel of the button too, and that it would feel wrong, but the results are excellent and the replacement switch feels much nicer than the original switch which is still present for the right-click button.

Because of the lack of a protruding button, it was necessary to cut a small amount of plastic from underneath the mouse button plastic of the EEE PC lid, as the original button is set inside a small circular hole there. This was easy to cut, and once done the lid fitted perfectly and the button works very nicely.

5 Comments more...

Overcoming CopyControl protection of old 16-bit applications with the help of XXCOPY.

by Carl Farrington on Oct.29, 2008, under Computer Stuff, Tips & Tricks

Old hard drive is E: (mounted through USB to IDE adapter)

New system is C:

C:

cd \

mkdir Application

xxcopy e:\Application c:\Application /clone /TC

Since CopyControl relies on the created/modified/accessed timestamps of the files within the hidden/system control directory of the application, the above will preserve them and CopyControl won’t be aware that the application has been copied to a new computer.

The /TC flag to XXCOPY causes it to preserve the file created, modified, and accessed timestamps, to the exact second. Whilst transferring Recruit to a new server late one evening a couple of years ago, I experimented and discovered that this was how the protection scheme (CopyControl) detected tampering/copying. At that time I used a tool called 12Ghosts FileDate or something, but XXCOPY does all this for us now. I am in the process of migrating five computers in a leasing company and am using this quick and easy procedure for transfering the DOS based quoting system which also uses CopyControl.

Some example applications: Oxford Software’s Recruit, LeasePlan / Network Lease’s Ultinet quoting system.

You can tell the application uses CopyControl because there is either a local or network folder which contains a hidden/system folder named something.NNN where NNN is some numbers, e.g. 489. Within that folder are some more files, one called something.CCC and also a file called CCONTROL.

This CopyControl is not the same as the one used by the music business on audio CDs.

Leave a Comment :, , more...

SBS 2008 is too expensive.

by Carl Farrington on Sep.24, 2008, under Computer Stuff

Microsoft’s Small Business Server 2008 is too expensive.

The trade cost for an OEM copy of SBS 2008 Standard Edition is now exactly double that of SBS 2003 R2 Standard Edition. Most people talking about the price increase only state that Premium Edition costs more because of the extra functionality, but I am talking about Standard Edition.

My OEM supplier is asking exactly double for SBS 2008 Std incl 5 CALs, OEM.

Additional licenses are a little cheaper – 20% cheaper. So, the product is 100% more expensive and the additional CALs are 20% cheaper.

Add to that the fact that you now have to buy the Outlook client separately (Office 2007 SBE or Basic) for £100 + vat per user, I think it’s too expensive.

1 Comment more...

Native (MAPI) Exchange Server connectivity on Linux. RPC/HTTP is coming..

by Carl Farrington on Sep.24, 2008, under Computer Stuff

I’ve mentioned this before, in my About Me page, but I just tried out a more current release of OpenChange and the Evolution mapi plugin, from this source: http://download.opensuse.org/repositories/home:/msuman:/evolution-mapi-provider/

This thing is so close to being totally sorted. I’m really impressed. The current build from the OpenSuse build farm service (19th Sept) has problems displaying the message body, but they are aware of this problem and believe it was introduced in a recent patch, so should be resolved shortly.

This is great stuff.

I had a chat with one of the developers on the #openchange IRC channel on Freenode, and he told me that RPC/HTTP support may well be here in the future!

3 Comments :, , , , , , more...

Linux/Unix (X) as an RDP (Remote Desktop Protocol) Server?

by Carl Farrington on Sep.20, 2008, under Computer Stuff, News & Reviews

Wow. This took me totally by surprise, and it seems to work very well. There’s no sound redirection or clipboard, but basically you connect to the Linux machine using an RDP client (Microsoft Remote Desktop Connection, or Terminal Server Client), and instead of getting a Windows logon box, you get an xrdp one. You choose a session and hey presto you have a Gnome or KDE session, through RDP!

It has two ways of working. The first, and easiest to get going, is that it uses vncserver (the VNC X Server) as the actual X server, and the xrdp program grabs the vnc display and RDPs it over to you. So you have the performance of RDP.
The other way is that it uses an RDP X server, so I suppose you could call that native X-RDP rather than VNC served RDP. This is a touch more complicated, and I was unable to get the svn version of the X11rdp Xserver to compile. There is a precompiled binary of what might be an old version at http://server1.xrdp.org/temp/ though.

The precompiled binary was the only way I could get X11rdp to work (that is native RDP – I got the vnc/rdp to work almost right away)

Let me clarify some points:

  • xrdp is the name of the project, and also the name of one of the binary files that deals with RDP and integrates with the VNC server and sends it to you through RDP.
  • X11rdp is the name of the special RDP Xserver that is another part of the project, which skips out vnc altogether. When you grab the (small) sourcecode off the project website, and do the make/make install, it will not build X11rdp.
  • X11rdp is also called “Xserver” within the project.

You will see in /usr/local/xrdp/sesman.log something like: “No such file or directory” if you are trying to use X11rdp server (sesman-X11rdp) but don’t have the X11rdp Xserver compiled/installed, or if you are trying to use VNC (sesman-Xvnc) but don’t have vncserver installed. VNC server will be provided by your distribution (Fedora, Ubuntu..) so is very easy to get. X11rdp is made by the xrdp project, so is not so easy, but the precompiled binary seemed to work OK for me.

The project’s website is very low priority, and does not reflect the true activity of the project.

The website is at http://xrdp.sourceforge.net/

Some random files, including a pre-compiled X11rdp (that’s the rdp-native Xserver remember..) are at http://server1.xrdp.org/temp/

There are some forums here: https://sourceforge.net/forum/?group_id=112022

You can browse the developer mailing list here: https://sourceforge.net/mailarchive/forum.php?forum_name=xrdp-devel

and there might one day be a new homepage at http://server1.xrdp.org

That’s about all the links I could find. The developer mailing list gives a nice indication that the project is moving forwards.

2 Comments :, , , , , , , more...

When adding a printer / installing driver “The RPC server is unavailable”.

by Carl Farrington on Sep.19, 2008, under Computer Stuff, Tips & Tricks

This is due to the print spooler service not running, or dying during the install.

You may also find that the print spooler service frequently dies – “spoolsv.exe has encountered a problem and needs to close”, or the Printers and Faxes folder frequently appears empty – i.e. all your printers are missing.

NetSupport Manager or NetSupport PC Duo version 8 on Windows XP SP2 will cause this to happen. Update NetSupport and all will be well.

2 Comments :, , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...