G's Blog

Just a place to post random things. Enjoy your stay.

NextCloud DB Migration to PostgreSQL (#100DaysToOffload Day 9)

So I'm getting todays post out early because i have a feeling the rest of the day will get away from me. It's also going to be a quick one.

(Late)Last night i decided to finally migrate my Nextcloud server's DB to PostgreSQL from Mysql. No specific reason other than I've heard many times that PostgreSQL performs/scales better. I've been wanting to do it for a while but figured it would be a long dangerous process that would almost require a reinstall of the server. Thanks to a toot on mastodon i found out that Nextcloud has an easy tool to do the migration. So after doing regular updates on the server i decided to do the migration. Seemed simply enough. Just run the following:

occ db:convert-type --all-apps pgsql nextcloud nextcloud

That ended badly

It was so late when i was doing this and i was very tired. The install was not broken so i just turned off maintenance mode and went to bed with the idea that i would spend much time this morning figuring out what was going wrong and how to fix it. I quickly posted to the Nextcloud IRC chan before i went to bed.

There was no response when i got up. I had a closer look at the error message and realized it was referring to a specific app. One that i had installed but never actually used. The Following oc_ocdownloader_queue_ID_seq pointed me in that direction. So i disabled/removed that app(oc Downloader) and deleted the 3 related tables from Mysql DB then re-ran the migration as follows:

occ db:convert-type --clear-schema --all-apps pgsql nextcloud nextcloud

Had to add the --clear-schema option since the schema had already been created in the PostgreSQL DB. All went well this time. For good measure i ran occ maintenance:repair that also went well.

Turned off maintenance mode and opened up the app. I right away noticed that things where loading faster. I navigated over to the admin overview page and it had a few recommendations. Had to run the following:

occ db:add-missing-indices

This could be done without enabling maintenance mode. Also had to run:

occ db:convert-filecache-bigint

This one had to be done while in maintenance mode.

After that all was happy. I was able to reinstall the offending app. I actually set it up this time and might actually put it to use.

I must say that things do seem to load faster(placebo or not). Overall a great migration. I'm not sure why NextCloud officially recommends Mysql over PostgreSQL but i would recommend to use PostgreSQL.

The only thing on that server left using Mysql is this blog(Writefreely). I'm going to see if that can use PostgreSQL as well. That way i can have only one DB backend running.

That is all for today(Ok maybe not a quick one after all).

Until tomorrow be safe!


Quick PinePhone update and new music (#100DaysToOffload Day 8)

So yesterday i tried using my PinePhone for a whole day. The results where promising but still some improvements. The latest Ubuntu Touch image now has notifications and ringtones. Also the timezone settings work properly(not a giant issue but something that's been bothering me). Call audio seems much better than last image i used. The remaining issues are around Power Consumption and sleep. The battery did not last half the day and when my wife called me after the phone had been sleeping for a while it did not ring and instead went right to voicemail.

Still the great improvement in call audio quality is a great step. I give it a month at the most and things should be in a much better position.

Another thing i did yesterday was pick up some new music from BandCamp. Since they where having another day of waiving there fees i figured i should pick something up. There was so much i wanted to get but in the end had to let my bank account decide. So i got the following:

Metropolis Deluxe Edition By NightCrawler First album i ever heard from this artist and i was impressed.

Dark Water By Electric Dragon Another First for me but was a must have.

And lastly

Bionic Chrysalis By DEADLIFE A great artist i already have 2 of his other albums. This one is a prelude to another album of his(The order of Chaos). Well i feel like it is not sure if it is officially.

I'll be getting more from all these artists in the future for sure. Give them a listen. Well worth your time.

Well that is all for today.

Until tomorrow. Stay Safe!


How many instructions to print Hello World (#100DaysToOffload Day7)

So this was supposed to go up yesterday but i passed out so here it is late.

About a week ago i saw a post talking about the (over)complexity of technology that keeps getting more and more complex in some ways seemingly to justify it's own complexity. In the process the fact that it took over 600k instructions to print the word “test” on a terminal window was pointed out. Since this was from 4 years ago i wondered how much that had changed since.

So here is the answer on my system.

First a little system info:

➤ cat /proc/cpuinfo | grep "model name"
model name : AMD Ryzen 5 2600X Six-Core Processor
➤ uname -a
Linux thebeach 5.6.8-artix1-1 #1 SMP PREEMPT Wed, 29 Apr 2020 18:45:03 +0000 x86_64 GNU/Linux

Now the test

➤ sudo perf stat echo "Hello World"
Hello World

 Performance counter stats for 'echo Hello World':

              0.54 msec task-clock                #    0.478 CPUs utilized          
                 0      context-switches          #    0.000 K/sec                  
                 0      cpu-migrations            #    0.000 K/sec                  
                62      page-faults               #    0.115 M/sec                  
         2,157,767      cycles                    #    3.999 GHz                    
           275,729      stalled-cycles-frontend   #   12.78% frontend cycles idle   
           169,688      stalled-cycles-backend    #    7.86% backend cycles idle    
           877,604      instructions              #    0.41  insn per cycle         
                                                  #    0.31  stalled cycles per insn
           187,115      branches                  #  346.745 M/sec                  
     <not counted>      branch-misses                                                 (0.00%)

       0.001129028 seconds time elapsed

       0.000000000 seconds user
       0.001178000 seconds sys

So there you have it 877,604 instructions to echo “Hello World”. I wont pretend to understand computer at that low level but that's an increase of 200k in 4 years to print a simple string. Part of this increase probably relates to mitigations for things like Spectre and Meltdown and some other “optimizations” over the years.

Well that is all for today.

Until tomorrow stay safe!


A little #SpringCleaning ( #100DaysToOffload day 6 )

Today's post will be another quick one. Did some Spring Cleaning today. Was feeling a little down so i decided to cut my hair and clean out my PC.

This kept me distracted long enough to take me out of the down i was in say YAY!! for that.

To see the before and after of what i did have a look here:


Feel free to follow me on Pixelfed. I don't post often but that might change soon.

This week is feeling really long and i just want it to be Saturday.

That's pretty much all for today.

Until tomorrow be safe!


The tale of 2 WebServers #SysAdminLife (#100DaysToOffload Day 5)

So today's post will be a bit of a repeat of something i posted on pleroma earlier today.

Up until now i have been using Apache as a webserver. Over the years it has served me(and my pages) well. I've known about Nginx and that it was another option for a while. But since it was a late comer Apache was what i started with and kept with it as most guides where talking Apache at the time.

Recently (like the last few years) that has changed at a fast pace but i have not. Now i'm thinking it's time i do. Or at least seriously consider it. I read a few comparisons today and all placed Nginx ahead of Apache in terms of speed and scalability. Mind you what i run/host right now is mostly single user/little traffic but who knows what the future holds. Also most of the Apache configs i use now where either found online after many searches or are very bastardized conversions of Nginx configs that the project provides.

So now the task of learning how Nginx is configured so i can understand what i'm looking at and best practices when crafting configs. Also the task of deciding when i'm making the switch.

I'm thinking maybe that will happen this weekend since i have regular scheduled maintenance anyways. If not then maybe mid may or with the june maintenance we shall see how much i can learn between now and Saturday. And if i feel up to it in general. I just want to be comfortable with the layout of config files and make sure i understand how to include them and where they live.

I'll update here when i do it. I'll probably make a post out of the transition.

Anyways that is all for today.

Until tomorrow be safe.


Oh Mondays how i loathe thee (#100DaysToOffload Day4)

So today started out messy. In true Monday fashion.

The company i work for brought back some of the employees that got layoffs. Which is great in general but how did i find out about it? When i started getting emails and call about this person and that person not being able to connect to the systems. Of course they can't connect because i disabled their accounts when they got layoffs...

So the morning was spent scrambling to get everyone's access restored and working from their new desktops (To maintain social distancing) so that was fun.

I wont turn all these into journal type ranting posts i swear but today's just had to be. I mean overall a good day trying to stay positive. In a way i suppose that's the point of doing this. Getting things out and not letting them bottle up right?

Anyways that's all for today.

Until tomorrow stay safe


What?!? Emoji's in the terminal you say? (#100DaysToOffload Day 3)

So up until the other day it had never occurred to me that Emoji in a terminal window could be a thing. But after installing/setting up #Tootstream i was surprised by what i saw.


There you have it emoji in a terminal window. This might not be a surprise to some of you but to me this seemed like something that could not be. So i needed to come up with a way to insert my own emoji's in my posts. Sure i could memorize the short codes from my instance but who's got time for that.

So my first venture was to find a website where i could copy and past emoji's into my terminal window. That started with this site. https://getemoji.com/ where i could find, copy and paste any emoji just like this 😀 😁 💩 😺 😸 . That was fine and dandy but it meant i had to have a browser window open and also an extra tab added to my collection of already too many. So i started looking for a different solution.

Enter Emoj

Emoj is a small little app that runs right in your terminal


That's right just type in a word and emoj will show you some emoji's that go with that word. Then you can select them with the left/right arrows and press the enter key to copy it to you clipboard. Or you can highlight with your mouse and copy/paste like any other text.

😺 😸 😹

And just like that i now have a quick way to insert emoji's into all my console based applications. I should note that this must be supported by your terminal emulator. I use mate-terminal. I think most recent emulators should support this. But for example xterm does not


That's all for today's post

Until tomorrow stay safe


Space Pictures from your Birthday (#100DaysToOffload Day2)

In today's post i will share a site i found from another site i follow. They posted the other day about a website nasa has put up that will show you what picture was taken by the Hubble Space Telescope on your birthday. I thought it was pretty cool so I'm sharing it here.

I will also just mention that these daily posts will not always come at the same time of the day since some days are busier than others.

That's all for today's post


Day 1 (#100DaysToOffload)

So the main write freely account (@write_as@writing.exchange) boosted a post on mastodon and i decided to join in.

So for the next 100 days i will find something to post about. I'll also try to come up with better titles as time goes on but for today that's all you get.

I suppose just the above counts as a post but lets try to do something a little more.

I will share 2 things that i have been up to during this pandemic.

First i decided to try and write a short story as a way to put my typewriter to use. So far it's going ok. I only have 3 pages(written twice) but i have an idea where to go with it. Just need to figure out how to get there. Once it's done i'll post it here for sure.

Second i took up learning C++ as i stated in another post and that's been slow going as you can see if you look at the repo where i'm documenting the progress. I plan on sticking to it but i gotta stop just laying around during my off time.

I also recently made the switch to a different DE. I'm giving Qtile a shot. It's a tiling Window manager all in Python. So far i'm loving it. Next post might be about my current setup with it. I'm sure i will never quite use it to it's full potential but time will tell.

Anyways i suppose that's all for this post. Until tomorrow be safe and take care.

G @mgrondin@youdabomb.social

COVID-19 Update 1 Apr 06 2020

I'm thinking of doing these once a week from now on. Both as a way to document the progress and to share how things are in my part of the world. I debated if i should post these public or not. If you would rather not see these let me know and i'll post them just for me.

I'll be honest that i'm not keeping a very close eye on things as to not get overwhelmed by the grand scale that this has become but i do keep up with it from day to day.

So as of today:

  • Gas prices are at an all time low of 0.70CAD/liter 1.88US/Gallon
  • Social distancing is being recommended but not really enforced. This is starting to change and be more enforced. It's also mostly left to individual provinces to enforce.
  • Seems many people don't get how bad this really is. Still going out to get BBQ's,pools and other non-necessities
  • 15,000 cases in Canada
  • 101 in my province
  • Schools have been closed for 3 weeks and will remain closed for the rest of the school year.
  • Only Grocery Stores, Pharmacies, Most gas stations, Most hardware stores, (probably other places i'm forgeting deemed to provide necessities) remain open
  • All Restaurants are take-out(Drive-through) or delivery only.

Lets see where things stand next week. Let me know if i should include other stats in my posts.