This page looks best with JavaScript enabled

Syncing Only .plexmatch Files

 ·   ·  ☕ 1 min read

The file syncing application I use to sync between my local data and my NAS (probably wisely) skips files that start with a . but I want my .plexmatch files to sync to my NAS too. I could remove this exception but I figured it’s probably best to not worry about that. I decided to sync them directly with rsync. Below is a method to sync all the files from all the subdirectories that match your input. Useful in this case because all of the files I want to sync have the same name (.plexmatch).

  1. Mount the NAS first
    sudo mount -t drvfs '\\myNAS\videofolder' /mnt/myNAS
  2. Dry run
    rsync -rnv --progress --include="*/" --include=".plexmatch" --exclude="*" /local/videosfolder/ /mnt/myNAS/
    I do believe the trailing slashes matter here

This forces rsync to check all the directories (the first include) and match all the files named .plexmatch (the second include), and then exclude everything else. When the dry run works as expected, remove the n from -rnv and it will fire for real.

Share on
Support the author with

omar saleem
WRITTEN BY
omar saleem
Software/DevOps Engineer