Sunday, 31 December 2017

Happy New Year!

2017 - another year added to our belt.

I hope that the new year will be bring you joy.

That 2018 will be a successful year.

That you can spend it with your family and friends because you'll never know how much you'll miss them until you cannot spend time with them.

I wish you all a Happy 2018.

Happy New Year!

Wednesday, 8 March 2017

Backups? Who needs stinking backups!

It's not often that I get to write about a success followed by a failure... followed by a success.

I run Linux on my corporate machine (Ubuntu in one flavour or another) and I had not upgraded in a while. This meant that my version of Ubuntu was End of Life and I need to completely re-image my laptop to get onto something more current.

Therefore, I did what anyone would do... backup my data.

I then attempted a restore to make sure that the data was still valid and "restorable" and proceeded to re-image my machine.

I hate to name and shame, but I used Deja-dup which is the default Ubuntu backup software to create my backups and check that everything was working.

However, after re-imaging my machine and installing the latest version of Ubuntu, I tried to restore my backup and lo-and-behold, Deja-dup tells me "There is no backup...."


Are you might assume, I went ahead and tried to find what I could do - I saw that all the backup files (duplicity-full.xxxx.tardiff.gz) were in the backup location so I didn't think anything about it...

I tried re-launching the application and when I did it tried to make a backup. I didn't want a backup, so I stopped it. Then started the app again and tried to restore with the same error message.

I decided I would try something else, so I go to the directory where my backup was located and.... it was empty! Actually, there was a duplicity-checksum file that had been created by the previous backup attempt.)


I couldn't believe my eyes. I wanted to die! I had not only documents but also code I had written. I had over a year's worth of work, notes, and items that I had saved... ALL GONE!


So, I started looking for what I could do to recover something that was recently deleted. I found ext4magic and extundelete...

I installed both, made my partition read-only (which was an encrypted drive.)

sudo mount -o remount,ro /dev/mapper/luks-<uid-of-drive>

I then proceeded to read the documentation on both and decided that extundelete was worth a shot...

I created a temporary directory to try to restore into and ran the application (and crossed my fingers) ...

sudo extundelete /dev/mapper/luks-<uid-of-drive> -o RESTORE/ --restore-all

I waited. And finally...

42GB recovered!

I then copied them over to another drive (for safe keeping) and tried to restore from those files... Still, Deja-dup said, "No backup found!" $!*&"!

I went and looked for what I could do to recover if I didn't have Deja-dup and I found that I could simply gunzip and untar the files. That it would create a "snapshot" directory and a "multivol-snapshot" directory. Everything in the "snapshot" directory was the file in the original state... while the other one contained parts which had to be put together.

Well, I did it... and I've recovered almost all the stuff I had.

Now to switch to something that I have used before and that works quite well... Back-in-time.

Saturday, 31 December 2016

Happy New Year!

2016. It came rather quickly and seem to have gone rather quickly too.

What has happened this year? I learnt I needed to update my IF rules earlier in the year so that at least I post something relevant! I had one of my dogs hit by a car at the very beginning of the year.

But with those things, I get stronger. I get smarter and wiser. I get a little bit more confident.

2017 will be another successful year. :-( He's ok now.

I wish you all a Happy 2017. May all your goals come true... that means work hard!

Happy New Year!

Monday, 4 January 2016

Remotely printing on a printer behind a firewall...


Today I needed to print something at home. My wife was there and she needed the document but didn't have a way of printing it herself.

So, how do you go about doing this? Well, there's probably a few ways, like creating a print queue using a shared drive and having a print server at home that checks that queue. Then you can upload the file to dropbox, gdrive or where ever you've shared the directory and get that printed.

But what if you haven't set that up yet? Well, depending on the printer and if you have a server/desktop with ssh running, you could tunnel it.

sudo ssh -L -L -L 

Obviously substitute your external IP with the IP to get to your ssh box and the printer IP with the one for the printer you're trying to use.

This command by the way is for printing to an HP printer and worked fine for me!


Thursday, 31 December 2015

Happy New Year!

And 2014 is over, just like that.
What has happened this year? Too much to really. A grandchild, a wife with a Masters, new friends, old friends...
I wish you all a Happy 2015. May all your wishes come true.
Happy New Year!

So as you can probably tell, I've automated my response to when a New Year even happens. I did it with IFTTT (If This Then That) which is great. However... I didn't update the message for this year so I so elegantly posted the same message I posted last year!

This happened on Facebook and here as you can see.

So, Rule #1 when starting a new year. Update the message you're planning on posting! You don't need to have it completed, but at least the gist. So that if you haven't done anything and 20xx comes along, at least you have the right message!

Happy New Year - May 2016 be a great year for you.


Wednesday, 31 December 2014

Happy New Year!

And 2014 is over, just like that.

What has happened this year? Too much to really. A grandchild, a wife with a Masters, new friends, old friends...

I wish you all a Happy 2015. May all your wishes come true.

Happy New Year!

Wednesday, 1 January 2014

Predictions for 2014

The New Year is here and lots of people are posting their New Year resolutions. This year I thought I'd try something different. Here are my New Year Predictions.
1. In the area of social media, we will find that all those companies that are gathering our tweets, Facebook posts, G+ shares, etc will finally start providing services that make use of this data. Thanks to Big Data Analytics and Predictive Analytics these companies will provide better discounts, more relevant and interesting advertising AND they will do it in such a way we won't even realize the complexities behind it all.
2. Space exploration will have some privately funded companies looking for new ideas by using crowdsourcing techniques and mass marketing.
3. Looking at DNA for techniques to prolong life has been going on for a while, but I think the next big breakthrough will happen this year. Now beating diseases like cancer is going to become even more important. Please donate to those doing research in these diseases.
4. Advances in cheap disposable computing device like the Pi and Arduino will make more DIY projects more appealing. Watch the big companies start to sweat at having these cheap device take over in the home. Thanks to this, educators will start to focus on technology again, making it more appealing to kids.
5. Google makes Glass more affordable than people currently expect it will be and finally opens it to everyone. In the $150-200 range. (OK that's just wishful thinking.)
Well, that is all I am going to put down for now. Now let 2014 begin!