South West Pains: Oh, Doctor Beeching!

Well.  We’ve just returned to the stone age with South Worst Trains South West Trains.

A Smart card rendered completely dumb by SWT HQ.
A Smart card rendered completely dumb by SWT HQ.

I’ve been using my South West Trains Smart Card just fine for the past month.  I had bought the contactless portion at Woking station’s ticket machines using the season ticket renewal option.

ALAS!

Today when I tried to do the same thing, the machine told me – several times, and most insistently, that it couldn’t find any season tickets.  I could buy regular train tickets for the card, and a 7 day pass between Woking and Guildford – but not a monthly.  So I walked up to the ticket office who told me that they don’t support these contactless cards and could only offer me paper tickets.  Talk about a step backwards!

Grudgingly I had to go for the paper route as I had to catch the next train to Guildford.  But before I went for my daily coffee fix at Costa, I went to one of the ticket office kiosks and asked if they were able to handle contactless cards.  Nope.  They couldn’t even read them.  All HQ’s fault, apparently.

What I don’t understand is why this worked before and now it doesn’t.  The system was working beautifully for the month I had the contactless card.  In/out at the barriers with not one single hassle.  Now I’ve got to go back to using paper tickets which wear out easily (often necessitating me to go and get it replaced), and thumble to pull the ticket out each time.

This is 2016, FFS, not the time of Doctor Beeching.

And when I tried to log into the South West Trains web site, not only am I not able to determine what my credentials are (I have them saved in my password management utility, but they’re not being accepted), but I’m getting this old chestnut:

Classic Windows 2008 Server (now a decrepit 8 year old OS) error - it can't negotiate a stronger set of TLS ciphers, PLUS they're not loading all their assets behind SSL (which they should).
Classic Windows 2008 Server error  (now a decrepit 8 year old OS) – it can’t negotiate a stronger set of TLS ciphers because it’s too old – they need to be using TLS 1.2 which is supported on Windows 2012) PLUS they’re not loading all their assets behind SSL (which they should be doing).  This is all too common a problem with a lot of commercial sites running on the Windows platform, and it’s driving me mad.

I wanted to check if I could buy the ticket in advance (although I’d still have to get the Plusbus component at the ticket office as SWT has never supported Plusbus on tickets longer than a week at the ticket machines).

In short: what a flippin’ mess.

Using rclone to backup your cPanel backups to a remote destination

cPanel/WHM has a robust backup system that can create .tar.gz archives of your accounts, combining email, web files, databases, etc. into a single archive that can be used to restore the account in the case of emergency, or to move to another server.

What it isn’t so good at is putting them somewhere off the server to ensure that if your it dies a horrible death (multiple hard drive failures, spontaneous combustion, human error, etc.) you can restore all your accounts.  Much of the backup system depends on third-party remote mounts, Amazon S3 or FTP servers.

Worry no more!  For one of the directors of Memset, the company that employs me to do things, has created a multi-purpose transfer tool called rclone.  It can be set-up to copy or sync data to a variety of multiple destinations, including:

  • Google Drive
  • Amazon S3
  • Openstack Swift / Rackspace cloud files / Memset Memstore
  • Dropbox
  • Google Cloud Storage
  • Amazon Cloud Drive
  • Microsoft One Drive
  • Hubic
  • Backblaze B2
  • Yandex Disk
  • The local filesystem

Since this site is hosted on a Memset server, it makes sense to backup my cPanel accounts over to my Memstore account, an object storage system that uses the OpenStack Swift protocol.  While we have custom FTP and SFTP proxies, it’s important to note that you can’t upload a file that’s greater than 5Gb in size. Thankfully rclone speaks native Swift and can handle sizes beyond 5Gb.

The following assumes a basic knowledge of Linux and access to SSH as root..

So the first thing to do is download a copy of rclone for your server.  Most people will be running a 64-bit Linux, so you’ll need to download the tarball for that.    The next step is to unpack the archive and install the binaries and manpage as per the instructions.  Skip the sudo parts if you’re on cPanel – it’s not needed, so:

Now run:

You’ll see something like this:

Press ‘n’ for New Remote.  You’ll then be prompted to give this a name.  You can call it whatever you like.  In this example I’ll be using the name ‘memstore’.  Once you’ve given it a name, you’ll be prompted for the storage type.  In our example, it’s OpenStack (number 10):

I’ve created a user within my Memstore/Memset account control panel called “cpanel” that I’ll be using to connect to the Memstore container “cpaneldemo” that will hold my backups:

2016-04-01_11-08-20

I then assign read and write permissions for user “cpanel” to the container “cpaneldemo”:

2016-04-01_11-10-23

Now to configure rclone:

So the username is the right-hand part of the Memstore username, and the tenant is the left-hand part (e.g. msdrakeab2.cpanel becomes user = cpanel, tenant = msdrakeab2).  The key (or password) will be displayed in plain text at all times, and is stored within the /root/.rclone.conf file.  Make sure that only root has permission to read this file – it should do by default, e.g.:

So we’re ready to rock and roll.  We don’t have any data in the container, but we can give a quick test to make sure we’re able to connect:

All seems to be working.  So let’s manually move some backups to Memstore.  Memset configures cPanel backups to be dumped to /backup on your server.  So based on that, the initial upload will look like this:

When we look at the contents of the container through the Memset account control panel:

2016-04-01_11-43-58

How do I retrieve backups?

Very easily done.  Let’s say we want to grab the account called ‘mice’ that was backed up on the 31st.  In the cPanel backup hierarchy, it’ll look like this:

So to get that back from Memstore, we’d do this:

where /tmp is the local filesystem where you want the file to be placed.  Can be anywhere on the filesystem.   You can leave out the file and have the entire contents of the ‘accounts’ directory transferred too (although in this example, there is only one file in ‘accounts’):

How do I automate the backups?

Simple, just add it as a cron job:

which will run at 1:30am and will dump the output to /var/log/rclone.log.

Other ideas

You could use rclone to create historical backups within Memstore, handy if you keep a set of daily backups that you’d like to keep around longer than the cPanel keeps them for on your server’s filesystem.  To do this, you ensure you have a destination container to sync to.  So let’s create one:

then sync the contents of one container to another.  Note that all of this is done on Memstore – no data is transferred from your server to Memstore (or vice versa).

The following example demonstrates a sync of the existing data in the “cpaneldemo” container to the new container “cpdev”.  I could  automate this by adding a cron job to sync data from “cpaneldemo” to “cpaneldev” on a weekly basis, for example.

Grand Theft Auto V.5: Guildford Edition

The driving lessons continue.

The previous two lessons have seen me drive in the dark and through a major downpour, which isn’t a bad experience, but my goodness, some cars have such bright front lights that even with glasses that are coated to deflect some of the reflection, it can be a bit of a pain if the other driver doesn’t dip their lights).  Took on the rain with no problems at all – although one tends to avoid the bigger puddles at the side of the road.  Having been soaked (during my cycling days) thanks to careless drivers, I’ll be damned if I’m going to do the same.

Took on turning around and reversing on the last lesson.  Much to learn – least that I must continue driving backwards and not keep stopping/starting (which means continue mirror-blindspot-manoeuvre checks).  Also, I think I need to improve my steering a bit.  This was the first time I had to turn the steering wheel quickly.  Found myself not following the curve around roundabouts when taking the first or second exits.  I was tending to keep going straight on where it’d be okay if I were turning off the third exit, but too darn dangerous if not.

I reckon by the time I pass my driving test, we’ll all have autonomous (or at least, semi-autonomous) cars!  Still so much to learn and think about.  And to practice.  But I’ll keep spending the money until I’m ready to take the test.  Would love to be able to pass it first time.  In the mean time, I don’t think playing any more Grand Theft Auto V is going to be doing my driving skills much good.

Sky Q Hub: IPv6 ready

The Sky Q Hub recently got an update which has seen more devices that support the next generation of IP addressing (IPv6).  My Mac, Kindle and a few other devices now get local IPv6 addresses via the Sky Q Hub. But alas, no remote IPv6 support yet.  But it suggests that Sky could be one of the first commercial ISPs to use IPv6 via the WAN.  I do hope so.  It won’t matter to too many people, but for somebody whose work entails working with these technologies, it’d be good to see the adoption of rate of IPv6 in the UK increase.

I’m still delighted with my Sky Q set-up.  The internet connection has been rock solid.  I have a static IP.  No compatibility issues with any of my Apple kit with shared SSID for 2.4Ghz/5Ghz bands either.  Everything I’ve thrown at the Sky Q Hub works (which, incidently, runs a version of BusyBox).

The Sky Q Mini upstairs continues to work like magic, and the Sky Q Silver box downstairs continues to work as advertised.  I’ve had four recordings on the go while watching other shows (or I’ve been upstairs and used the Sky Q mini to watch live TV using the Sky Q Silver’s additional tuners).

In short: all this has been a very worthwhile investment.  Virgin Media will be given notice shortly, and I’ll happily remain a Sky customer providing they continue to keep things ticking along nicely.