Here you can download the files for fixing mysql issues ( deleting database ) on WSP 1.0.1.0, 1.0.2 , 1.1.0, 1.1.2, 1.2.0 AND 1.2.1

INSTRUCTIONS :

Replace “websitepanel.providers.database.mysql.dll” file in “server\bin” folder with the one you downloaded. These fixes fixed my problem on all servers EXCEPT the one running mysql 5.0.27 version….ones runing 5.1 and 5.0.77 works fine. I Will update if I get this solved too…

Currently I am getting this error on 5.0.27 server: ERROR: ‘MySQL Server 5.0′ DeleteDatabase System.Data.EvaluateException: Cannot perform ‘=’ operation on System.Byte[] and System.String.

FIX for 1.0.1.0 version can be found HERE

FIX for the 1.0.2 version can be found HERE

FIX for the 1.1.0 version can be found HERE

FIX for the 1.1.2 version can be found HERE

FIX for the 1.2.0 version can be found HERE – UPDATED!!

FIX for the 1.2.1 version acan be found HERE – UPDATED!!

FIX for the 1.2.1.6 version acan be found HERE - UPDATED!!

Hope it will be helpfull.

If you have any questions, just let me know.

Ofcourse, these fixes are provided AS-IS . I dont guarantee it will work on your machine, and I cannot take responsibility for any damages cause by it.

Yeah yeah,  I know you can do snapshots using HyperV,but…snapshots suck! Why? Machine performance degrades with every snapshot you add and snapshots ARE NOT backups!!! Dont make me start talking about the time when you need to turn off that machine; does “Merging…” sound familiar? Yeah, I hate Merging too!

Recently I was given a chance to test the new beta version of Altaro Hyper-V backup.  I downloaded the BETA 1 version and installed it on one of my HyperV machines.

Installation was pretty straight forward and I am sure that anyone can do it! It basically consists of typical “Next”, “Next” and “Finish” steps.

New features, compared to the old version ( more details about the old version can be seen here) are:

-  Windows Server 2012 Support, including support for VHDX files.
-  Windows 2012: support for backup and restore of VMs located on network paths.
-  Windows 2012: support for Volume Shadow Copies of SMB3.0 network paths.
-  Windows 2012: support for CSV3.0 and scale-out CSV file shares.
-  New and improved Metro-Style Interface ( maybe we need to call it “Windows 8 style UI” )

Among the new stuff, there was room for some other fixes and improvements:

- Link to error reporter from Management Console.
- Extra verification checks in Reverse Delta algorithm.
- Improved free-space calculation (Backup no longer checks for full size of VM in free  space).
-  Many more improvements and bug fixes under the hood.

After starting the software we are greeted with a slick dashboard that provides almost all neccesary information you need to know about your backups. List of most latest backups, Restore history, Error log, and a graph showing your disk space usage.

 

For me, most amazing features that I need to point out are:

Restore Clones – restore VMs to the same Hyper-V Host but with a different name.
Restore to different Hyper-V host
File Level Restore ( one of my favourite features! )
Mount backed up VHDs & restore files without having to restore a whole VM.
Back up crash consistent Linux VMs without shutting down the machine.
FireDrill Restore Tests ( safety first!)

Altaro Hyper-V backup comes in three editions: a free edition that can backup two virtual machines,  standard edition that supports five virtual machines and unlocks some of advanced features, and an ultimate edition that protects an unlimited number of virtual machines on a host and adds centralized support for a cluster.

I must admit that I had some skepticism in the beginning ( I think all sys-admins are sceptics by design :)   ), so I scheduled every possible notification to be sent to my email address.  After a week or so, I turned off all notifications beside the one that sends an email if a backup fails. WHY? Lets me put it this way: Fire and forget!This thing just works!

Even though Altaro is a relatively young company (  founded in 2009 ), list od their clients is pretty impressive (over 8000 of them!):  University of Harvard, New Zealand Defence Force, Mitsubishi Polyester Film, Swedish Defence Research Agency and many, many others.

At the moment of writing this post, I have the software running for 2 months now and there was no single glitch at all! I wish I could say that for other software we normally use…I cant say its name, but it starts with “R1″ and ends with “Soft” :)

Another thing that impressed me is the speed that the backups are being made! Initial replica of 30,22 GB  virtual machine took only 24 minutes! I didnt get that speed with any other backup solutions!

Enough talk, lets see this thing in action, shall we!?

Like I said, the speed of backup is amazing! 4 minutes for 700 MB of data!

As a system administrator, there are some features that I would like to have in next version:
- web based interface where users can restore their VM on their own ( without bothering the system administrator )
- multiple user roles ( Administrator, operator and user )
- backups of physical machines ( I know the software is called HYPER-V backup, but adding this new feature could really transform it in the perfect backup solution for Windows )
- integration with Websitepanel or some other control panel ( primary for File Level restore )
- API

With those aditions, I would seriously consider ditching our existing backup solution and replacing it with Altaro Hyper-V backup.

Altaro are also giving away two free Nexus 7’s to testers of their Hyper-V backup for Win 2012 beta. Check out all the details here.

Final verdict : 9/10 ( I got annoyed by the popup screen when you click on an option that isn’t avaiable in the currently registered version :P )

Since I work in a big web hosting company, we have A LOT of phone calls and tickets from people who dont know how you set up their mail client ( mostly Outlook and Thunderbird ).

Since I got fed up with it, I decided to explore how autodiscover for Microsoft Outlook and Mozilla Thunderbird works.

Creating a script for Thunderbird was pretty much very simple, but creating a script for Outlook took a bit more effort and “reverse engineering” :)

I will not go into details about the script for Thunderbird, since everything is explained here: https://developer.mozilla.org/en-US/docs/Thunderbird/Autoconfiguration/FileFormat/HowTo

Lets focus on the autodiscover.xml generator for Outlook.

After couple of hours of searching I found an information about the POST request that Outlook sends to the autodiscover server on autodiscover.domain.tld/autodiscover/autodiscover.xml .

This is the request:

<?xml version=”1.0″ encoding=”utf-8″ ?>
<Autodiscover xmlns=”http://schemas.microsoft.com/exchange/autodiscover/outlook/requestschema/2006″>
<Request>
<AcceptableResponseSchema>http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a</AcceptableResponseSchema>
<EMailAddress>JohnDoe@sample.com</EMailAddress>
</Request>
</Autodiscover>

So, what do we need to do here? For starters, we need to extract the email address from the POST request. Second step is to extract the domain name from that email address and use that data to generate autodiscover.xml file that Outlook can understand.

In order for out script to work, we need three prerequisites!

1. Create a CNAME record called “autodiscover” and point it to the server where you keep the scripts for generating XML files.

2. Create a rewrite rule that will redirect the request to the correct script.

3. Beer or coffee

Rules that you need to add to your web.config file or .htaccess file on the autodiscover server are:

1.

<rule name=”Thunderbird” stopProcessing=”true”>
<match url=”^(.*)mail/config-v1.1.xml” />
<action type=”Rewrite” url=”thunderbird.php” />
</rule>

2.
<rule name=”Outlook” stopProcessing=”true”>
<match url=”^(.*)autodiscover/autodiscover1.xml” />
<action type=”Rewrite” url=”outlook.php” />
</rule>

Please note that you will most probably need to modify the rewrite rule if you’re using a linux server.

Lets explain these rules. Since Thunderbird searches for configuration file on domain autodiscover.domain.tld/mail/config-v1.1.xml , we need to redirect those requests to our script called thunderbird.php .

Pretty much, the same thing happens with Outlook. Like we said before, Outlook looks for autodiscover.xml file on domain : autodiscover.domain.tld/autodiscover/autodiscover.xml . We redirect those requests to outlook.php script that generates the XML file.

Funny issue I had with Outlook is that even though I was getting a valid XML output, Outlook just didnt want to load the settings. After some more Google, cursing and coffee I found the information which said that the script needs to return code 405 as a response, not 200 OK as EVERYONE would expect! Way to go Microsoft! :D

When you open the scripts, you can modify your settings accordingly ( mail ports, SSL, mail server address, etc…)

Download link for Thunderbird script

Download link for Outlook script.

Oh, almost forgot. I am pretty much close to finishing the script to automatically create a mail account in Apple Mail.

If you have any question or suggestions, just holla at me!

Bye, bye! Alesandro.

 

From time to time I need to import old log files from IIS to our statistics software ( Awstats ) and pretty often I need to do that with lots of .log files. Instead of doing it manually, I wrote a really simple script that will do that for us.

 

BEFORE runing the script be sure to delete old Awstats data from your data folder ( usually C:\awstats\data ). Delete the files only for the website you’re updating; not all of them.

When you run the script, you will have to write the path to the folder where you keep your log files. After that you need to enter the EXACT website name.

Function Awstats
{
param ($Dir = $(Read-host "Enter path to log file")),
($Website = $(Read-Host "Website name ( without www )?"))
$TargetFolder = $Dir
if (Test-Path $TargetFolder)
{
Write-host "Folder name is :" $TargetFolder -foregroundcolor "Red"
$Files = get-childitem $Dir\*.* -include *.log
$List = $Files | where {$_.extension -eq ".log"}
foreach ($File in $Files)
{
write-host "Updating statistics! Please wait." -foregroundcolor "Red";&'C:\perl\bin\perl.exe' awstats.pl config=$Website logfile=$File}
}
Else
{Write-Host "Folder $TargetFolder doesnt exist! Input correct path!" -foregroundcolor "Red"}
}
Awstats

Do I need to point out that you will have to change the path to your perl.exe? :)
Also, dont forget to place the script in the same folder where your awstats.pl is!

You can download the script from this link

If you have any questions, feel free to contact me.
Bye

Hi all :)

Today I had to change the location of all log files on all of the websites on the server. Since all sysadmins are lazy as hell, I wrote a simple powershell scripts that will do that.
All you need to do is change the path from “c:\logs” to some other .

Have phun! :)

Import-Module "WebAdministration" -ErrorAction Stop
foreach($site in (dir iis:\sites\*))
{
write-host $site.Name
#write-host $site.Bindings
#write-host $site.State
#write-host $site.physicalpath
Set-ItemProperty IIS:\Sites\$($site.Name) -name logFile.directory -value ‘C:\Logs’
}

If you uncomment these lines:

#write-host $site.Bindings
#write-host $site.State
#write-host $site.physicalpath

you can get additional information in your output.

But what if you want to have every log file in separate folder, and folder called by site name? Simple!


Import-Module "WebAdministration" -ErrorAction Stop
foreach($site in (dir iis:\sites\*))
{
write-host $site.Name
#write-host $site.Bindings
#write-host $site.State
#write-host $site.physicalpath

if (!(Test-Path -path C:\Logs\$($site.Name)))
{
New-Item c:\Logs\$($site.Name) -type directory
}
Set-ItemProperty IIS:\Sites\$($site.Name) -name logFile.directory -value “C:\Logs\$($site.name)”
}

This will create folder named the same as the websitename and set the log path to c:\logs\sitename\

So much for now.
Bye!