TIL: Archive, Network, Cloud & Disk

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

Currently my Feedly can’t for some unknown reason access my RSS feed (Atom feed works fine). So to check whether there are some blocked/banned IPs, I grepped the fail2ban log and iptables listing:

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 config/config.php settings.

    container_name: nextcloud-web
    build: ./web
    restart: always
      - /local/disk/space:/var/www/html:ro
      - VIRTUAL_HOST=domain1.com,domain2.com
      - LETSENCRYPT_HOST=domain1.com
      - LETSENCRYPT_EMAIL=example@domain1.com
      - app
     - proxy-tier
     - default
$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:

  1. Shutdown the VM
  2. In the Hyper-V Manager select Actions > Edit Disk…
  3. Select the virtual disk you’re interested in
  4. Select the option “Expand”
  5. Adjust the size of disk
  6. Download the GParted Live CD (or your personal favorite partition manager)
  7. Open the VM settings and “insert” the Live CD into the DVD Drive of your VM
  8. Start the VM and boot into GParted
  9. Move around the partitions to your liking and apply the changes
  10. Reboot into the OS again

Sources: #1, #2

Leave a Comment

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.