Monthly Archives: January 2019

Weeknotes 3

21st January 2019 – 27th January 2019

As Katie was working full time hours at her job this week covering for the manager, I was doing both school runs and more childcare than usual. This lead to a feeling of being at least ten minute behind on everything I did for the week as I tried to cram a useful amount of work in to the available hours (many more than there could have been due to grandparents helping.) Tom being ill Thursday night and off school on Friday meant I am now working on Sunday trying to catch up lost client hours.

Client work

I finished the tail end of the server move for a client, that being finally working out what was stopping a Lets Encrypt SSL certificate installing on their admin area (a config option had not taken although in a control panel it looked like it had), some final testing and deleting the old virtual server. Also, a bunch of changes to two sites and writing specifications for Laura so she could write the code for other more in-depth changes. For another client, compiling information on what we’re doing on the many domain names they have registered in different accounts by different people, what that’s costing them, and whether they are worth keeping.

On top of that, I got my personal tax return done. I’m not sure if I should have entered the tax I’ve paid on account for the 2017-2018 year somewhere in the return, so I may yet need to pay money I’ll get a refund for. Although the online filing for self assessment tax returns is an enormous amount better than the old paper forms, and has improved from its earlier digital versions, sometimes it is still confusing.

My projects

Very little progress on these due to losing so many work hours.

On the positive side, I did manage to get my data our of my broken Vagrant system and next week should be able to get it all back up and running, and integrate in the work I did while the data was locked away.

I am determined to get more done on these next week.

Watching an episode of the TV series Salvage Hunters: Classic Cars reminded me that I had been working out what parts of building my ideas I could outsource/subcontract. Experience subcontracting client work has taught me that a decent specification does wonders for getting something built with the fewest problems possible. Unfortunately, this also takes a chunk of time to write and due to modern frameworks within programming, it can be borderline if it is quicker to write the code than it is to write out the spec clearly.

This is something I still need to think about more and experiment with, as I am not making enough progress on my own.

The Farm

We had around 17 people at the Farm this week, a bit low due to a cold snap and the ongoing “Dry January”. It was great to catch up with Haze, who’s been away in America. My notes were:

  • New Orleans
  • Fitting in learning new skills and tech
  • Machine learning
  • “He was in to roundabouts”
  • Illness
  • OS Commerce (the bad old days)
  • Working from an ex-prison
  • The Skiff coworking space
  • Farm website
  • Mutual project catch up
  • Presenting past experiences which are not entirely relevant to what you want to do now
  • Finding work quickly

I need to get the Farm site moved to new hosting, and give Haze access to it so he can add in a search to the site. Another thing on my infinite to do list.

Reading: Continuing with Jeeves in the Offing, perhaps the most flowery Jeeves-type prose of the 5-6 I’ve read.

Writing with: Mainly a Papermate Inkjoy Liquid 0.5 needle point. Works well like the now discontinued Bic Z4+ needle points, shame it doesn’t have their chunky and soft grip section.

Getting MySQL data out of a Homestead virtual machine when Vagrant is broken

I’ve now learned how to get data out of a Vagrant run virtual machine when Vagrant itself is broken. Steps below.

I recently upgraded my Mac to use Mojave and this broke my old Vagrant install, which I use for Homestead and a bunch of my Laravel based development websites. It was a bit of an old version of Vagrant, but still annoying. At first I thought VirtualBox, the software for creating virtual machines, just needed updating. Unfortunately an upgrade of VirtualBox was required for it to run in Mojave, but not the solution to my problem.

In general, the virtual machine (VM) breaking wasn’t a problem – I have all the site files as part of the point of using Vagrant is having those in a shared folder on your main file system, not only inside the VM Vagrant sets up to hold the development environment. So I’d lost the development environment, including Apache, MySQL, and some other bits, but not the files of my site and the environment would be easy to set up again as that’s what Vagrant makes simple.

But… I had a bunch of data in two databases within MySQL in the VM that I really wanted to keep. Upgrading Vagrant would mean wiping the data, so I didn’t want to do that. I thought to recover the data and back it up I was going to have to restore a Time Machine backup of the whole computer back to the previous version of the OS – High Sierra.

Fortunately I mentioned the problem to a few friends (AKA I moaned about my situation) and Tom  suggested I mount the VM direct. That inspired me to start poking around more, here is how I got my data out of the broken Vagrant box…

Recovery steps

Open VirtualBox and manually start the machine Vagrant set up by clicking on it and clicking the start icon.

This boots the virtual machine and gives me a command prompt.

At “homestead login:” I needed a username and password, the default for a Vagrant built VM is vagrant and vagrant (thanks to Stefan on Stackoverflow for putting up that one.)

Then I needed to backup my databases on the command line. I’m used to using web based tools for MySQL admin, so had to look this up too:

mysqldump -u homestead -psecret --all-databases > homestead-20190121.sql

Thanks to Jacob for that one.

This gives me a big text file with all the exported data in it, which is great, but the file is still inside the virtual machine, not on my normal file system where I can get at it.

After much thought I remembered what Tom had advised me in the first place – mount the VM as a drive. I took that as the starting point of some Googling and set up a shared folder using this advice.

That involved re-starting the VM and then once I was logged in, I needed to check what that shared folder was called from within the Ubuntu VM and with more searching based on some very old memories from university, I found this command:

df -h

Which lists the share to a folder called “2019 01 January” which I’d set up. It was under /media/sf_2019_01_January

So within the VM I then did:

sudo cp homestead-20190121.sql /media/sf_2019_01_January/

Because the first time I ran it, I didn’t have enough permissions to copy the file. Sudo let me temporarily have more permissions and do the copy.

Checking in the shared folder, I found all my data. I can now use this to restore the databases elsewhere.

To cleanly close down the VM, I used:

shutdown

This has a delay built in, so I now know I should have used:

poweroff

Which would have been a bit quicker.

Weeknotes 2

14th January 2019 – 20th January 2019

Client Work

Not a lot to report, it was mainly dealing with the remaining work in moving lots of websites from one server to another for one group of clients, and doing some straightforward updates to the site of another. Plus, checking some work Laura had done for the group.

My projects

I discovered the upgrade of my Mac to Mojave had broken both Virtual Box and the old version fo Vagrant I’ve been using. This was not good as I had some data in a couple of databases still in the virtual machine in it that I needed to recover, and re-building Vagrant would wipe them out. I had thought I could boot from the Time Machine backup I have of the computer, but either I didn’t set it up correctly to do that when I started taking the backups that way, or it’s just impossible these days.

I’m still working out exactly how I’m going to fix that one. I have bought an extra external disk to use as storage as my current one is getting full, so I’ve taken a full backup of my current set up in case I have to restore the previous version to get the data out.

On the more positive side, I got some work done on Brisk that I could do without the missing data, and on an extra app I want to make an early version of to help me take notes of podcasts. The latter was integrating in code Sky wrote me about 2½ years ago. Things are slow when you’re trying to fit them around higher priority work.

The Farm

We had 19 people along to the Farm this week. Each week I take some notes on what was talked about, which go in to the adverts I post to the BNM list and a general archive. My notes from this week are:

  • Government confidence vote
  • Surviving losing a big client
  • Turning hosting in to a higher value service
  • New Orleans
  • Using Tide for business banking
  • Nicolas Cage’s Pyramid Tomb
  • Bitcoin
  • Doubt on Netflix
  • Rust
  • Atlas Obscurer
  • Has Brighton’s homeless problem got worse or just more visible?
  • Judging whether to do pro bono work to break in to a new area of business
  • Big charities are businesses, small charities are often a mess
  • Using breaks in client work to improve your skills
  • Successful band members who still have day jobs
  • Self building your home

Watching: Fast & Furious 8 (AKA The Fate of the Furious) – daft fun

Reading: I finished Metropolitan, it was excellent. Have started Jeeves in the Offing by PG Wodehouse

Writing with: Mainly a Sainsbury’s Hybrid Gel pen, and a bit with a Pilot G-Tec-C4, which gives a good, smooth and very fine line but is a pain to write with a lot due to the ridges on the grip section.

Weeknotes 1

7th January 2019 – 13th January 2019

Inspired by Clive, Simon and Graham, I’m trying writing some weeknotes to record what I’ve been doing recently.

Client work

Built a newsletter and set up a drip feed of the monthly news out over a couple of social networks for one client, then most of the week was swamped by an ongoing problem for another two clients, who are in the same group. Their websites have been failing briefly for a week or so and all log hunting and optimisation measures came to naught.

As part of ongoing changes to try to improve things, I decided we should get on and move the sites up to PHP 7.2 as they were still on 5.6, which has just gone out of support. This also meant moving (virtual) server and while the host has a ‘clone’ tool which would copy the sites between servers… except it wouldn’t if I’d used their “one click install” to put WordPress or a framework in place. Queue the manual move of a six sites, some of medium complexity.

Added to this: a few meetings, two days at the coworking space I use, and lots of communication with Laura, who does a lot of work for some of my clients with me.

Farm

My freelancers networking group started meeting again on Wednesday, as we will every Wednesday through to Christmas. About 20 people came along, with three newbies, which is good for January as a lot of people doing “dry January” don’t come to the pub for fear of lapsing. I wasn’t drinking, but that was because I was driving.

My own project work

I wanted to spend a day of work on my own projects this week, which is mainly building a Google Ads tool, but also moving a bunch of sites from a friend’s hosting to elsewhere as he’s shutting down the last of his servers. No decent work was done on these as I was juggling server problems or life.

I’ve also been failing at writing up a blog post about being Skiff ‘Captain’, hopefully I’ll finish that next week.

Home life

Katie started a new job just before Christmas, and juggling caring for our son has become a lot more complicated now she’s also busy with work. School term restarting has helped, but I’m not putting enough time in to this at the moment and I seem to be constantly behind.

Watching: Valerian and the City of a Thousand Planets – in chunks.

Reading: Metropolitan by Walter Jon Williams. ¾ of the way through, second read but it’s been 20 years so a lot of the detail had disappeared. It’s very, very good, which is the bit I did remember.

Writing with: mainly a Zebra Z Grip Max (older v1 solid black version) – I’m trying to use up a lot of the pens I already own this year, hence mentioning it at all. The Z Grip Max is variable, some of the ones I’ve had have been great, this one is a bit scratchy unless the paper is very smooth, then it’s great.

Writing in: a Lemome A5 notebook with dot grid. It’s got a hardback cover of cork, and is being very nice so far. That’ll be with me at least a couple of months.