7zip Only What You Want
The other day I had to package a directory with photos and video clips inside, but I only really wanted the image and not the large video files. With GUI and explorer shell integration that’s kind of hard to achieve, but with the command line it’s rather easy to include/exclude certain files or paths (and it also works on network shares):
7z a -tzip Archive.zip "\\server\photos\**\*.jpg"
Check Blocked IPs
sqlite3 /var/lib/fail2ban/fail2ban.sqlite3 "select ip,jail from bans" | grep xxx.yyy iptables -L -n | grep xxx.yyy
Nextcloud with Multiple Domains
On another server I’m running a Nextcloud instance, mostly as an “free” cloud archive system for the orchestra I play in, but I also want to potentially use it to hold some of my private data, out of reach of Google, Microsoft and alike. Since those two things would operate on different domains, I always planned to make it accessible from multiple domains, but couldn’t figure out how to do it with the reverse proxy and Let’s Encrypt certificates, until today.
As so often, it turns out to be rather simple. I’m using the Docker variant of Nextcloud and only one of the two domains use Let’s Encrypt, the other one is behind Cloudflare. The required changes were once in the
docker-compose.yml file, to set both domains für the application/reverse proxy and secondly to add the domain as trusted domain to the
services: ... web: container_name: nextcloud-web build: ./web restart: always volumes: - /local/disk/space:/var/www/html:ro environment: - VIRTUAL_HOST=domain1.com,domain2.com - LETSENCRYPT_HOST=domain1.com - LETSENCRYPT_EMAILfirstname.lastname@example.org depends_on: - app networks: - proxy-tier - default ...
<?php $CONFIG = array ( // ... 'trusted_domains' => array ( 0 => 'localhost', 1 => 'domain1.com', 2 => 'domain2.com' ), // .. );
Expand Disk Space of Debian Hyper-V VM
Ever since activating thumbnail generation for Plex, the disk space of my Debian VM has been getting lower and lower. Once again, I was forced to expand the virtual disk:
- Shutdown the VM
- In the Hyper-V Manager select Actions > Edit Disk…
- Select the virtual disk you’re interested in
- Select the option “Expand”
- Adjust the size of disk
- Download the GParted Live CD (or your personal favorite partition manager)
- Open the VM settings and “insert” the Live CD into the DVD Drive of your VM
- Start the VM and boot into GParted
- Move around the partitions to your liking and apply the changes
- Reboot into the OS again