Blog

New Code Projects: Backblaze B2 Version Cleaner & VBA SharePoint List Library

Itā€™s been a while since Iā€™ve posted code of any description, but Iā€™ve been working on a couple of things recently that Iā€™m going to make publicly available on my GitLab page (and my mirror repository at code.jnf.me)

Backblaze B2 Version Cleaner

I wrote last week about transitioning my cloud backup to Backblazeā€™s B2 service, and I also mentioned a feature of it thatā€™s nice but also slightly problematic to me: it keeps an unlimited version history of all files.

Thatā€™s good, because it gives me the ability to go back in time should I ever need to, but over time the size of this version history will add up – and Iā€™m paying for that storage.

So, Iā€™ve written a script that will remove old versions once a newer version of the same file has reached a certain (configurable)Ā ā€œsafe age.ā€

For my purposes I use 30 days, so a month after Iā€™ve overwritten or deleted a file the old version is discarded. If I havenā€™t seen fit to roll back the clock before then my chance is gone.

Get the code here!

VBA SharePoint List Library

This one I created for work. Getting data from a SharePoint list into Excel is easy, but I needed to write Excel data to a list. I assumed thereā€™d be a VBA function that did this for me, but as it turns out I was mistaken – so I wrote one!

At the time of writing this is inĀ ā€œproof of conceptā€ stage. It works, but itā€™s too limited for primetime (it can only create new list items, not update existing ones, and each new item can only have a single field).

Out of necessity Iā€™ll be developing this one pretty quickly though, so check back regularly! Once itā€™s more complete Iā€™ll be opening it up to community contributions.

I have no plans to add functions that read from SharePoint to this library, but once I have the basic framework down that wouldnā€™t be too hard to add if youā€™re so inclined. Just make sure you contribute back!

Get the code here!

Shrapnel

Late Night Links – Sunday January 24th, 2016

Blog

Raspberry Pi Whole Home Audio: The Death of a Dream?

If youā€™ve been following my blog for a while, youā€™ll know
that Iā€™ve written a whole
series of posts
on my efforts to take a few Raspberry Pis and turn them
into a DIY whole home audio solution.

If youā€™ve ever looked at the product offering within the
whole home audio space, youā€™ll know that setting such a thing up is either
cripplingly expensive, involves tearing the walls apart to run cables, or both.

Where we left off Iā€™d put together a solution that was
glorious when it worked, but that was rare. Typically the audio was either out
of sync between the devices right from the get go, or quickly got that way.

Getting the Pis to play the same music was relatively
simple, but getting it perfectly in sync so that it could be used in a
multi-room setup eluded me to the end, and eventually I gave up.

The bottom line is that synchronizing audio between multiple
devices in a smart way requires specialized hardware that can properly account
for the differences in network latency between each of the end points. The Pi
doesnā€™t have that, and itā€™s not really powerful enough to emulate it through
software.

So is my dream of a reasonably priced whole home audio
solution dead? Hell no.

In October I wrote
about Googleā€™s announcement of the Chromecast Audio
. At the time it didnā€™t
have support for whole home audio but Google had promised that it was coming.
Itā€™s here.

The day they announced that it had arrived was the day I
headed over to my local BestBuy and picked up four of these things. I plan to
add two more, and I couldnā€™t be happier with the results.

Plus, it frees up the Pis for other cool projects. Watch
this space!

Blog

Cloud Backup, Episode III

Iā€™ve written a couple
of times
before about what I do to backup all my important data.

My last post on the topic was more than a year ago though,
so Iā€™ll forgive you if youā€™ve forgotten. Hereā€™s a recap: originally I was using
a fairly traditional consumer backup service, ADrive.
This worked well because theyā€™re one of the few services that provides access
by Rsync, which made it easy to run scripted backup jobs on my linux
server
. Their account structure didnā€™t really meet my needs, however: you
pay for the storage you have available to you, not what you use. When I hit the
upper limit of my account the next tier up didnā€™t make financial sense, so I
switched.

About 15 months ago I moved my backups over to Googleā€™s Cloud Platform. This gives me an
unlimited amount of storage space, and I just pay for what I use at a rate of
$0.02/GB/Month. This has been working well for me.

In December I
found
Backblaze
B2
. They offer a service very similar to Googleā€™s (or Amazon S3, or
Microsoft Azure, or any of the other players in this space that you may have
heard of), except they cost a quarter of the price at $0.005/GB/Month. Thereā€™s
even a free tier, so you donā€™t pay anything for the first 10GB. When I first
looked at them their toolset for interacting with their storage buckets really
wasnā€™t where I needed it to be to make them viable, but theyā€™ve been iterating
quickly. I checked again this week, and Iā€™ve already started moving some of my
backups over.

In time, I plan to switch all my backups over. So far Iā€™ve
moved my documents folder and backups of my webserver, which totals about
2.5GB. Thatā€™s nice, because it means Iā€™m still within the free tier. The next
thing to tackle is the backups of all our photos and music, which combine at
around 110GB. That means I have to transfer 110GB of data though, which is
going to be a painful experience. Iā€™m still thinking about the best way to do
it, but probably the direction Iā€™ll go is to spin up a VPS and have it handle
the download of the backup from Google and the upload to Backblaze, then it
doesnā€™t hog all the bandwidth I have on my home internet connection.

The only other thing to think about with Backblaze is
versioning. Google offers versioning on their storage buckets, but I have it
disabled. With Backblaze there is no option (at least not that Iā€™ve found) to
disable this feature ā€“ meaning previous versions of files are retained and
count toward my storage bill.

Iā€™m torn on this. The easy thing to do would be to disable
it, assuming one of Backblazeā€™s future iterations of their service offering is
in fact the ability to turn this off. Iā€™m thinking though that the smarter
thing to do is make use of it.

For me and my consumer needs, that will most likely mean I
put together a PHP script or two to more intelligently manage it, however. Some
past versions are nice, but some of the files in my backup are changed pretty
frequently, and I definitely donā€™t need an unlimited history.

Still, Iā€™m very much pleased with the price of B2, and
watching the feature set rapidly improve over the past couple of months gives
me confidence that I can move my backups over and keep them there for the
long-term, because the transition from one service to another is not something
I want to put myself through too often.

Shrapnel

Late Night Links – Sunday January 17th, 2016

Itā€™s time for late night links again! Did you know that so far I havenā€™t forgotten to post this even once in 2016? Weā€™re on a roll here. Letā€™s keep it going.

…and weā€™re done! Until next week then, internet friends!

Shrapnel

Late Night Links – Sunday January 10th, 2016

Itā€™s that time again!

And weā€™re done for another week! Have a good one, and Iā€™ll catch you next week – same time, same place.

Shrapnel

Late Night Links – Sunday January 3rd, 2016

Itā€™s the first late night links of 2016!! Are you excited for all the improvements Iā€™m making? You shouldnā€™t be. Nothing is changing.

And weā€™re all done for another week! Until next time then, folks!