If a Postgres table is dropped, do you also have to delete it's indexes, triggers or constraints?

I have come accross this question many times: “If I delete a Postgres table, do I also have to delete it’s indexes, triggers and constraints before or afterwards?“. The short answer is no. When a table is dropped, Postgres will also delete it’s related indexes, triggers and constraints. In the following article a docker-compose.yml file and some code snippets are provided if you want to validate this behaviour. [Read more...]

Java 11: Using the new HTTP client (java.net.http.HttpClient, JEP110)

Since Java 11 there is a new HTTP client. This article shows how to use the new API to send an HTTP POST request with a JSON body to a server. As a counterpart to the client program a server is implemented which provides the corresponding REST API. This article also shows how to use the curl program to send an HTTP post request with a JSON body to this server. [Read more...]

Backup your Outlook 365 mailbox

If you want to backup the emails from your Microsoft Office 365 mailbox you can utilize the execellent OfflineIMAP program. In this article I will outline how you can configure and use OfflineIMAP for this specific use case. [Read more...]

Running systemd inside a docker container

Recently I ran into a situation where log messages from a service implemented in Golang were missing from a Linux system. To be able to easily troubleshoot this problem and quickly iterate over possible solutions I utilized Docker and ran systemd inside a Docker container. [Read more...]

OpenSSH: How To maintain your lists of known hosts

When using ssh to connect to a server the ssh client checks the identity of the server by using one or more so called known_hosts files. In these files the public keys are stored on a host name or IP address basis. This article shows you how you can make proper use of this mechanism. [Read more...]

Cleaning up snapshots created by apt-btrfs-snapshot

Current versions of Ubuntu and Kubuntu install a package named apt-btrfs-snapshot by default. This package creates a btrfs snapshot each time packages are installed or removed. These snapshots can take up a lot of space if not cleaned up regularly. [Read more...]

Preseeding Debian

Preseeding the Debian netinst ISO image allows you to fully automate the installation process of the Debian operating system on your servers. You just boot your target server using the customized netinst ISO. [Read more...]