rsync

sync directories with external ignore file

rsync -av --exclude-from={'list.txt'} sourcedir/ destinationdir/

list.txt

testfile2.txt
*.txt
dir3
dir4
test*
*2*

Rsync over SSH

I use TARGET variable to make naming of logs and directory selector easy to change

Examples

Sync, Ignore, and Remove Unwanted

Trying to integrate this with my Digital Gardening file management

#! /bin/bash

WORKDIR="/mnt/uasis5/gardens/my-notes"
DATE=`date +"%Y %b, %d [%H:%M]"`

SOURCE="/mnt/uasis5/notes/my-notes/vault"
IGNORE="ignore.md"
DESTIN="/mnt/uasis5/gardens/my-notes/published-vault"
## for a front page
INDEX="my-notes/index.md"

cd $WORKDIR

rsync -av --exclude-from="$SOURCE/$IGNORE" $SOURCE/ $DESTIN/
cp $SOURCE/$INDEX $DESTIN/index.md
rm $DESTIN/$IGNORE

This technique askes the most of your IT knowledge, and I'm sure there are other solutions that are simpler or have a pretty UI, but going with this route makes for a sleek and light system. To get this set up, follow these 2 articles


Credits