Skip to content

Find large files in a BackupPC transfer log (sort files in XferLOG by size)

When your backups suddenly takes much longer to complete, it could be because large files that were previously excluded from the backup were renamed or relocated elsewhere. In order to identify those files, or just to sort the list of files by size, I use the following code (bash):
cd /tmp/
BackupPC_zcat /var/lib/backuppc/pc/mypc/XferLOG.99.z > xlog
for S in `cat xlog | sed -e 's/^[^/]*\/[0-9]*[ ]*//' | cut -f1 -d\ | egrep '^[0-9]+$' | egrep '[0-9]{9,}' | sort -n | uniq ` ; do fgrep " $S " xlog ; done
This will show the list of files bigger than 99999999 bytes (100 MB). Remove "| egrep '[0-9]{9,}'" to just list all instead.

Note: on Debian, BackupPC_zcat is in /usr/share/backuppc/bin/. I've added a symlink in /usr/local/bin/ so that I don't need to look for it every time.


Configure Garmin Express to download files to a different partition

Short answer: you can't. Files (map data, firmware updates etc.) are always downloaded to %ProgramData%\Garmin\CoreService\Download (typically C:\ProgramData\Garmin\CoreService\Download)

The only solution I could find is to move that folder to another partition (make sure to completely exit Garmin Express first), then create a link to it:
c:>cd C:\ProgramData\Garmin\CoreService

c:\ProgramData\Garmin\CoreService>mklink /J Downloads "d:\Garmin.Downloads"
Junction created for Downloads <<===>> d:\Garmin.Downloads

c:\ProgramData\Garmin\CoreService>


Add HEIF support to Ubuntu Linux 18.04 (thumbnails / gimp) - preview and open HEIC files from iPhone directly in Ubuntu

Since Apple moved from JPEG to HEIF as default format about two years ago, there has been a lot of progress.

There is a very straightforward way to add minimal HEIC/HEIF support to Ubuntu:
sudo add-apt-repository ppa:strukturag/libheif
sudo apt-get install heif-gdk-pixbuf heif-gimp-plugin heif-thumbnailer

That's it! You don't even need to logout or restart, the new functionality is available immediately.

More details here and here.

All-black maps with staticmaplite (OSM static map generation - Access control configuration prevents your request from being allowed)

I've been using the staticmaplite library for a while to generate static maps based on OSM tiles.

Recently I started getting the following error when downloading tiles:
Access control configuration prevents your request from being allowed at this time. Please contact your service provider if you feel this is incorrect.
The OSM team was very responsive when I contacted them and they pointed me to https://operations.osmfoundation.org/policies/tiles/.

Based on that info, I checked how staticmap.php was fetching tiles and noticed that the User-Agent string was hardcoded to "Mozilla/4.0". I fixed this and now I can fetch tiles again. You can get the updated version from here: https://github.com/crox-net/staticmaplite.