jeudi 27 octobre 2022

Linux Mint 21 Vanessa on main laptop

I used the GUI tool:

  • sudo apt update
  • sudo apt install mintupgrade
  • sudo mintupgrade

This tool required/proposed to start a timeshift snapshot before upgrading.  I did create that configuration to store the snapshots on /media/luc/Sea1/timeshift/

Then it took quite a while to simulate/download/perform the upgrade.  It also removed some "non official" packages like the Belgian EID stuff and maybe some other Debian or Ubuntu packages (I don't remember which ones).  But finally ended OK and reboot was fine (no need to reinstall Grub or anything like that).

UrBackup agent still alive and kicking.  Darktable version unchanged (3.6.0).  Multi-head monitor configuration still OK.

mardi 25 octobre 2022

Ubuntu 22.04 LTS on backup server

  • do-release-upgrade ran on 25/10/2022
  • After quite a while, upgrade finished with positive message
  • Reboot: no need to reinstall grub this time (yeah)
  • Piwigo still OK under DynDNS and HTTPS (but see remark about PHP below) so mysql still OK too.   
  • UrBackup server still alive and kicking after the upgrade.
  • however : PHP was upgraded from 7.4 to 8.1 and the apache2 configuration didn't get the message so apache failed to start.  Thus:

luc@kid2:~$ sudo a2dismod php7.4
Module php7.4 disabled.
To activate the new configuration, you need to run:
  systemctl restart apache2
luc@kid2:~$ sudo a2enmod php8.1
Considering dependency mpm_prefork for php8.1:
Considering conflict mpm_event for mpm_prefork:
Considering conflict mpm_worker for mpm_prefork:
Module mpm_prefork already enabled
Considering conflict php5 for php8.1:
Enabling module php8.1.
To activate the new configuration, you need to run:
  systemctl restart apache2

mercredi 25 mai 2022

SSH keys

Continued to create ssh keys (one per environment) for my personal account on the 3 K8s servers.  Used ssh-keygen (with default parameters) and ssh-copy-id to copy the public key to all the workers.  So now I can login from the master to any of the workers on each cluster.  That's so many less password typing/pasting.

vendredi 5 février 2021

Reinstall Linux on the Dell laptop

Goal is to test the Linux Mint upgrade (from 20.x to 21.xx).  But I first tried installing Fedora.  However the out-of-the-box install couldn't cope with the Broadcom wi-fi interface so I quickly gave up on that one.  I installed from the same Linux Mint as what I have used on the Medion laptop (I think 20.04).  Worked like a charm but I had to install the firmware-b43-installer (and required b43-fwcutter) to support said wi-fi interface.

Then added darktable (from the apt repo: 3.0 only so I got 3.4.0 from Software Manager instead).  Also added rapid-photo-downloader and all its prerequisites.

So:

sudo apt install firmware-b43-installer

sudo apt install rapid-photo-downloader

sudo apt install autofs

sudo vi /etc/auto.master

sudo service autofs restart

Also, renamed the host to "run12l" (the prior hostname when running under Ubuntu):

sudo vi /etc/hostname

sudo vi /etc/hosts

Then also reinstalled the urbackup client (via the server's web interface "download client" link, not from the internet -- because this allows the client certificate from the old client to work with the server, so we can restore old files that were backed up prior to the OS change).  By the way to enable restore with the web interface, it is necessary -- after install -- to edit /etc/default/urbackupclient and set option 

RESTORE="server-confirms"

Please note that the quotes are required in that line.  Then reboot or use

sudo service urbackupclientbackend restart

mardi 15 décembre 2020

New M2.2280 SSD

Installed a 2nd 512GB SSD in the laptop.  Easy peasy.  After a week or so, rebooted in single user mode and unmounted it, then cleanup of the underlying old "/home" directory, then restarted again (thus reclaimed a few dozen GB from the first SSD).

lundi 30 novembre 2020

Databases "hot" backup : PostgreSQL

I hadn't installed Postgres in a while and apparently my current software stack doesn't require it.  So I first had to install from the repos:

sudo apt-get install postgresql

I loaded some sample data using a tutorial available from https://www.postgresqltutorial.com/load-postgresql-sample-database.  However I had to fix the "CREATE DATABASE" statement in this file, apparently the codepage 1252 is specified (Windows) and my Linux Mint PostgreSQL didn't like it.  So :

  • CREATE DATABASE dvdrental WITH TEMPLATE = template0 ENCODING = 'UTF8' LC_COLLATE = 'English_United States.1252' LC_CTYPE = 'English_United States.1252';
was replaced by:
  • CREATE DATABASE dvdrental WITH TEMPLATE = template0 ENCODING = 'UTF8';

The pg_dumpall command is supposedly able to backup everything.  Trying manually first:

  • sudo -u postgres pg_dumpall -f /var/tmp/postgres.backup.`date +%Y%m%d_%H%M%S`.psql
That worked fine, so added it in postgres's crontab:
$ sudo mkdir /var/backups/postgres
$ sudo chown postgres:postgres /var/backups/postgres
$ sudo crontab -lu postgres
# m h  dom mon dow   command
50 16 * * *  pg_dumpall -f /var/backups/postgres/postgres.backup.`date +%Y%m%d_%H%M%S`.psql
Well now that doesn't work anymore, for some reason the datestamp part of the command doesn't work quite right under cron.  So I wrote a short script to do it:
$ more dailybackup.sh
#! /bin/sh

pg_dumpall -f /var/backups/postgres/postgres.backup.`date +%Y%m%d_%H%M%S`.psql

That's OK now.

$ sudo crontab -lu postgres
# m h  dom mon dow   command
10 17 * * * /home/luc/Projects/dvdrentals/dailybackup.sh
$ ls -l /var/backups/postgres
total 96
-rw-rw-r-- 1 postgres postgres 45710 nov.  30 17:06 postgres.backup.20201130_170614.psql
-rw-rw-r-- 1 postgres postgres 45710 nov.  30 17:10 postgres.backup.20201130_171001.psql

 

lundi 23 novembre 2020

/var was still too small...

 

So : 

mkdir  /var/backups/urbackup/tmp

chown urbackup:urbackup  /var/backups/urbackup/tmp

Then in  /etc/default/urbackupsrv :

 DAEMON_TMPDIR="/var/backups/urbackup/tmp"