Avoid constraint errors when running parallel pg_restore

To enhance the restore speed for PostgreSQL databases, the pg_restore command running the most time-consumping steps concurrently by providing the number of jobs with -j/--jobs.

Unfortunately the parallel restore can fail when restoring foreign keys due to not yet restored tables:

pg_restore: error: could not execute query: ERROR:  there is no unique constraint matching given keys for referenced table "page"
Command was: ALTER TABLE ONLY pagecontent
    ADD CONSTRAINT "$1" FOREIGN KEY (page_id) REFERENCES page(id);

 

weiterlesen

How to use SSH FIDO2 on a remote machine

Configuring and using a local Yubikey for SSH with FIDO2 is very straight forward using the Yubico manual Securing SSH with FIDO2

But in some cases I would like to use my Yubikey based SSH key on my office's workstation when I am at home using my notebook.

weiterlesen

Old Let’s Encrypt Root Certificate Expiration workaround

The expiring Let’s Encrypt DST Root CA X3 can cause problems on old servers:

root@server:/etc# wget https://www.example.com/monitoring
--2021-09-30 21:34:39--  https://www.example.com/monitoring
Resolving www.example.com (www.example.com)... 93.184.216.34
Connecting to www.example.com (www.example.com)|93.184.216.34|:443... connected.
ERROR: The certificate of `www.example.com' is not trusted.

Fortunately there is an easy workaround to ensure the expired chain is not checked.

weiterlesen

Configuring an Unify Dream Machine for Swisscom 6RD IPv6

The residential Swisscom Internet Box 2 does not allow to autoconfigure an Unify Dream Machine with IPv6.

After several hours of research I found a workaround to get IPv6 support.

weiterlesen

Workaround for missing DomainClassConverter in Spring Boot JUnit tests

In one of my projects I let Spring Boot automatically bind domain objects from the database.

This fails in the reduced unit test setup, because DomainClassConverter is not available. But it can be mocked!

weiterlesen

Avoid conversion warnings when using yedit ansible role

When I fist started to use yedit to modify YAML files I got the following warning:

[WARNING]: The value {...} (type dict) in a string field was converted to "{...}" (type string). If this does not look like what you expect, quote the entire value to ensure it does not change.

 

weiterlesen

Shrinking LVM physical volume running on software RAID

Due to a misconfiguration I had to shrink a LVM 2 volume group and its physical volume running on a software RAID.

weiterlesen

Formatting phone numbers using libphonenumber in Thymeleaf

The Google phone number parser & formatter is very helpful to ensure the same number format for user prodived data. To simplify the use in Spring Boot application with Thymeleaf I created a wrapping TagLib/ExpressionFactory.

weiterlesen

Samsung SSD as Linux Software RAID

Initially I thought adding a pair of Samsung 860 EVO as software RAID to my small home server cannot be too hard...

... but they seem to require special kernel settings to work.

weiterlesen

Setup Unifi Controller on Debian 10 / Buster

The requirements of the Unifi Controller do not allow a direct installation. But with a few manual steps a successful setup is possible!

weiterlesen

Seite 1 von 6

© 2015 - 2022 Moritz Kobel

Theme by Anders NorenUp ↑