HowTo: Use Journalctl to View and Manipulate Systemd Logs
Related cards:
Don't use puppet `exec` type without `cwd` and `user` parameter
-
Don't use
exec
withoutuser
parameterIf you use
exec
withoutuser
parameter, the command will get executed as root. You mostly don't want this. -
There is a difference in the env variables of the exec if you run puppet man...
HowTo: Clone and refresh all repos in a GitLab Group
If the project you're working on has, say, 39 repositories and counting in GitLab and you need all the repos checked out for some reason, here's how to do it.
Checking out all repos
- Create a personal access token for GitLab that has the `A...
HowTo apply Test Driven Development to Container Images
Apply Test Driven Development(TDD) to the process of building container images by defining test before writing code and automate the testing process. Iterate through the TDD cycle while developing and running the tests later in continuous integrat...
HowTo: Easier selecting and copying of text in tmux
When using tmux
, selecting and copying multiple lines of text can be a hassle, especially when using splits (highlighting lines will cross pane borders, copying contents from the other pane too) and when the user wishes to copy (thus, select) li...
dumping and restoring PostgreSQL databases
This card is just about creating simple PostgreSQL dumps. This is no instruction for a backup strategy nor a guide for SQL dump performance optimization.
Read before starting
- I will assume that all commands will be executed as local `postgr...
Desktop notification for failed systemd user services
You can execute systemctl --user --failed
to check for failed systemd user units. But let's face it: It's inconvenient and you'll probably miss failures. Better use desktop notifications.
~/.config/systemd/user/service.d/user-failure-notifi...
loginctl: Failed to look up user $USER: No such process
When you get this error message from e.g. loginctl show-user [...]
after you deleted a user from your system:
# $USER is the username you deleted
loginctl: Failed to look up user $USER: No such process
then you can either switch to a L...
Use systemd-run as an alternative for screen
You might use screen
or tmux
to run a temporary command on a server which continues to run after the SSH session is closed.
Consider systemd-run
as alternative. It will turn every command in a systemd ser...
Use Terraform grouping mode like Golang's Ellipsis expression
The terraform documentation states the ...
syntax as (grouping mode*. See: Grouping-Results).
But this seems not the be the whole truth. Instead the ...
sy...
Useful PostgreSQL commands
on the bash (issued as postgres user)
Start/Stop/Restart PostgreSQL
pg_ctl -D $configdir start|stop|restart
Start/Stop/Restart the corresponding PostgreSQL using the given configuration directory. The configuration directory sh...