Carl’s Blog

Archive for January, 2009

Google says the Internet may harm your computer, even Google themselves are dangerous!

by Carl Farrington on Jan.31, 2009, under Uncategorized

I just did some googling, and it seems every single website that Google knows about “may harm your computer”, and you cannot click through to them from the search results.

Here are a couple of screenshots:

2 Comments more...

Scheduled Backup to RDX / RD1000 with SBS 2008 and wbadmin

by Carl Farrington on Jan.20, 2009, under Computer Stuff, Tips & Tricks

Using wbadmin, you can back up everything, including Exchange, to the RD1000.
If you tell wbadmin to back up to the target drive directly, e.g E:, it will want to reformat the disk every time and therefore only allow one backup on the disk, and it will prompt you to allow the format, even if you gave the parameter -quiet. So instead we share the RD1000 and use a script like this:
@echo off
set Logfile="c:\network shares\company\Backup Log.txt"
rem Should be called with backup name as parameter, backup will be stored in that backup name's folder.
echo. >>%logfile%
Echo ***** Backup starting at %date% on %time% >>%logfile%
Echo Creating Backup Directory at \\server\rd1000\%* >>%logfile%
if not exist "\\server\rd1000\%*" md "\\server\rd1000\%*" >>%logfile%
Echo.  >>%logfile%
Echo ***** Starting Data and System files backup  >>%logfile%
wbadmin start backup -backuptarget:"\\server\rd1000\%*" -include:c: -quiet >>%logfile%
Echo. >>%logfile%
Echo ***** Starting Exchange Server Backup >>%logfile%
del "C:\Users\Administrator\AppData\Local\Microsoft\Windows NT\NTBackup\data\*.log"
ntbackup backup "@C:\Users\Administrator\AppData\Local\Microsoft\Windows NT\NTBackup\data\Exchange.bks" /a /d "Exchange Server" /v:no /r:no /rs:no /hc:off /m normal /j "Exchange Server" /l:s /f "\\server\rd1000\%*\Exchange Server.bkf"
type "C:\Users\Administrator\AppData\Local\Microsoft\Windows NT\NTBackup\data\*.log" >>%logfile%
echo. >>%logfile%
echo ***** Starting IRIS backup >>%logfile%
sqlcmd -S SERVER\IRISPRACTICE -Q "BACKUP DATABASE [IRIS] TO DISK = N'\\server\rd1000\%*\IRIS-FUll Backup.bak' WITH NOFORMAT, INIT, NAME = N'IRIS-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10" >>%logfile%

Save the script as c:\dobackup.cmd , and call as “c:\dobackup Daily Backup” or “C:\dobackup Monday” with the Task Scheduler. Obviously make sure there is enough space on your RD1000 for five backups. If not, alter the script or just call it with “Set1″ and “Set2″ instead of Monday, Tuesday, Wednesday etc.

Although it looks like there is nothing there to say “Back up the Exchange IS”, there is an “Application” entry for Exchange in the registry under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WindowsServerBackup\Application Support\{76fe1ac4-15f7-4bcd-987e-8e1acb462fb7} , and the output of the backup says “Running consistency check for application Exchange.” This confirms Microsoft’s documentation that SBS’ version of Windows Server Backup does indeed back up Exchange.

Because I am a wuss, and I have no faith, I am also doing an NTBackup of the Exchange IS to a file on the disk. The NTBackup files that you will need to run NTBackup on SBS 2008 can be found here. Extract them to C:\Windows, because there is a VSSAPI.DLL in Windows\System32 that NTBackup doesn’t like. If you extract the files to \Windows, ntbackup will use the VSSAPI.DLL in its own directory.

15 Comments more...

SBS 2008 Unbootable after partition resize – winload.exe; Status: 0xc0000225; Info: The selected entry could not be loaded because the application is missing or corrupt.

by Carl Farrington on Jan.18, 2009, under Computer Stuff, Tips & Tricks

The server is all done. One last thing to do – resize that Dell OS partition now that we have the Data partition on a separate 500gb RAID1.

Being an old fashioned person (read: not a Vista user, and new to SBS 2008), I didn’t think to use Disk Management to do the resize. I used Acronis Disk Director. This resulted in the system not booting, with the above error message.

I was at a bit of a loss for what to do. I ran chkdsk from an NTFS bootdisk and this made no difference. Obviously there is no boot.ini any more, and to make matters worse, the Dell supplied SBS 2008 DVDs are non-bootable, so I was a bit stuck.

Whilst waiting the 2hrs for the SBS 2008 DVD ISO to download from Microsoft.com, I thought I’d try out a Vista disk and see if that would repair the bootmgr. It did and now all is well.

The problem is apparently caused by the UUID of the partition changing, leaving the bootmgr unable to find it, as per this article.

3 Comments more...

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...

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...