Log shipping not working in SQL 2016 – Solution

If you are having trouble getting Log Shipping to work in SQL 2016, make sure you have .NET 3.5 installed. The prerequisites state .NET 4.6, as does the version checker in the installer. However, it seems that the log shipping binary relies on .NET 3.5.

I noticed this when I tried to enable log shipping and the jobs kept failing. The error just said that it failed at step 1, with no further information. I then looked at the command line for the job, pasted it into the command line and up popped a notice about installing .NET 3.5. I installed that and low and behold it started working.

Simple solution to a fairly simple problem, but a bit frustrating until you figure out the cause.

Home backup strategy

Backup strategy is something I am passionate about and something I have dealt with for a lot of my working life. This post comes at it from the angle of a home user, with options to suit the average person who wishes to protect their data.

For most people it is great to have so many photos of friends and family floating around, but stop to think what it would be like if your computer died and you lost it all. It’s worth giving some thought to how you can protect your data.

I wrote a post about backing up your family photos. This post follows on from that and gives a much more bullet proof solution, which you can apply to your whole household.

3-2-1 backup strategy

The concept of the 3-2-1 backup strategy is that you should always have 3 copies of your data, two of which can be in the same place (but on DIFFERENT platforms) and one must be off site.

This can sound a little over the top at first glance, but when you analyse the strategy it makes a lot of sense.

Let’s take a look…

Firstly, what are we trying to protect against?

The answer is loss of data, but this can be a number of factors, but they come in two flavours:

Physical loss of data (fire, flood, theft etc).

To mitigate this factor we must have an OFF SITE copy. This is one of your 3 copies and it can either be kept in the cloud (dropbox, Google Drive, Crashplan etc) or it can be taken away on a hard drive (or whatever medium) and stored elsewhere. This only works if the data is static, and if you add to it you need to be quick to take a new copy off site. For most of us an automated cloud backup solution is better.

Digital loss of data

This can be data corruption, scratches (in terms of DVD’s etc) or other digital factors. Take DVD’s as an example. If you have your data on 2 DVD’s and they get scratched then you have lost your data (yes, you probably haven’t taken enough care, but nevertheless), or at the very least you are reliant on the cloud version which you may or may not have tested. There have been cases where people have gone to their cloud version and for whatever reason it was not up to date due to their Internet connection being slow or other factors. The cloud is a great backup, but shouldn’t be your only one.

That’s why the best scenario is where the other 2 copies that you have locally are on different platforms. This can be Hard Drive and DVD, or even two platforms like Time Machine and a backup to a local NAS drive.

An example of a good backup system

I often get asked for an example of the perfect setup. I don’t think a perfect system exists, as it all depends on your needs and how much data you have, but here is a good starter for six!

Backup Number 1 – Time Machine

I use a Mac, so Time Machine is built into the Operating system. If I plug a Hard Drive into my Mac it asks me if I want to set it up as a backup. It them backs up all my data as I create it to this external drive. You can even get wireless versions that sit on your network. There is an added advantage of being able to access deleted items and changed files.

Backup Number 2 – The NAS

If you have a home NAS (some routers allow you to plug in a hard drive to create shared storage) then you can schedule your Mac or PC to sync your crucial data to this shared storage either at set intervals or before you shut down. If you don’t want to do this then you can simply copy your data to this location as and when you need it (e.g. when you have downloaded new photos from your camera). Sometimes people use this second backup just to store critical stuff like family photos.

Backup Number 3 – Crashplan (The Cloud)

Crashplan can be set to run in the background and backup your data to the Crashplan servers. There is a charge for the product but if you have a friend you can set it up to backup to each others computers and it won’t cost you a penny other than the cost of the hard drive storage.

Another option for this is to simply use Dropbox, but you have to be careful not to exceed your account.

Conclusion

There you have it, a simple 3-2-1 backup strategy that gives you peace of mind that your data is safe in case of disaster.

Force browsers to the HTTPS version of your site

After writing my posts about the benefits of HTTPS I thought it might be a good idea to write a short post letting you know how to easily send visitors to the HTTPS version of your site rather than the HTTP version.

Open your .htaccess file in the root of your website (where your main index file is). If you don’t see one then you either need to tell your FTP client to display hidden files or you may need to create a new .htaccess file.

Enter the text as follows, customising it to the URL of your site:

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://hostsynergy.co.uk/$1 [R,L]

That’s it, all users going to any page on your site should now have it server up using HTTPS

Simples!

Backing up your family photos

It’s a while since I have posted about backup strategy but it’s such an important topic I thought it was worth a revisit.

If you are like me you probably have all sorts of data around your house, across multiple computers, phones and devices. While everyone is different, I think most people would agree  that in the event of losing their data “en mass” the most devastating would be the loss of their family photos.

While the risk of losing photos due to water damage, sunlight, or general wear and tear is a lot less, the biggest risk nowadays is hard drive failure. I have seen many examples of people taking their dead hard drive to their designated “techie friend” in the vain hope that it could be recovered. Sometimes it can, sometimes it can’t, and often even if it is possible it involves significant cost.

Companies are pushing bigger and bigger hard drives, NAS devices, USB sticks etc upon us, and it’s great that we  can now store years and years of data on these, but in actual fact the situation (and risk) is getting much worse. Where you used to have your photos stretched over 4, 5 or 6 devices, now you can fit them all on a single hard drive… so why not? The answer is simple, if that device fails you lose EVERYTHING!

Yes it is possible to have 2 hard drives and backup everything twice, but in reality how many people do that?

NAS devices also allow you to configure them in RAID mode, where you can use two disks together and the data will survive if one fails. The problem is you can also configure them where they use the full capacity of the two disks (RAID 0), which looks on paper to be great…. more disk space than you can shake a stick at. The problem is you’re back to losing a lot of data if a disk fails.

The other issue is how often you actually backup your data. Most people find that when they have a failure it’s been “quite a while” since they last backed up.

The best situation is to backup automatically. To have a system where you don’t have to think about it. There are services such as CrashPlan which offer this service if you have a reasonable internet connection. It’s great as it keeps your data safely off-site, so if you has a flood or fire you can always get your data back. CrashPlan also allows you to setup your own servers (or peer to peer with a friend) so you can backup to those instead (or as well!).

The ideal situation is to backup to multiple places, having several copies of data in multiple locations. This is a lot to consider for a lot of people, so that’s why I often recommend CrashPlan, as it is simple to use and doesn’t cost the earth. If you don’t want to go that route then by all means continue to use hard drives, but please consider buying a second one, using that as well, and keep it in a different location to the first one.

If you have any comments or questions please leave a comment.