diff --git a/backupmac.sh b/backupmac.sh index 02a1f7d..020fc9e 100755 --- a/backupmac.sh +++ b/backupmac.sh @@ -1,31 +1,33 @@ #!/bin/sh +REPOSITORY=pi@pi4:/media/hdext/borg #REPOSITORY=marc@nas:/dat/bak/borg_mac -REPOSITORY=pi@kodi:/media/hdext/borg +#REPOSITORY=pi@kodi:/media/hdext/borg +#REPOSITORY=marc@vdr.fritz.box:/media/hdext/borg #REPOSITORY=/Volumes/nifty/bak/borg borg create -v --stats --progress --compression zlib --one-file-system \ $REPOSITORY::'{hostname}-{now:%Y-%m-%d}' \ - / \ - /Volumes/Data \ + /System/Volumes/Data \ --exclude '*/tmp/*' \ --exclude '*/tmpfile/*' \ --exclude '*/Temp/*' \ - --exclude '/var/tmp/*' \ - --exclude '/var/crash/*' \ + --exclude '*/var/tmp/*' \ + --exclude '*/var/crash/*' \ --exclude '*/.cache/*' \ --exclude '*/cache/*' \ + --exclude '*/Caches/*' \ --exclude '*/.ccache/*' \ --exclude '*/Caches/*' \ --exclude '*/mlocate.db*' \ - --exclude '/run' \ - --exclude '/var/cache/apt/archives/*.deb' \ - --exclude '/var/cache/man' \ - --exclude '/private/var' \ + --exclude '*/run' \ + --exclude '*/var/cache/apt/archives/*.deb' \ + --exclude '*/var/cache/man' \ + --exclude '*/private/var' \ --exclude '/tmp' \ - --exclude '/var/tmp' \ - --exclude '/Users/marc/tmp' \ - --exclude '/Users/marc/Downloads' \ + --exclude '*/var/tmp' \ + --exclude '*/Users/marc/tmp' \ + --exclude '*/Downloads/*' \ --exclude '*/Caches/*' \ --exclude '*/.Trash/*' \ --exclude '*/.Spotlight-*' \ @@ -33,8 +35,9 @@ borg create -v --stats --progress --compression zlib --one-file-system \ --exclude '*/ot_shared_cache' \ --exclude '*/dyld_shared_cache*' \ --exclude '*/Downloads/*' \ + --exclude '/System/Volumes/Data/Applications/Xcode.app/*' \ - Use the `prune` subcommand to maintain 7 daily, 4 weekly and 6 monthly +# Use the `prune` subcommand to maintain 7 daily, 4 weekly and 6 monthly # archives of THIS machine. The '{hostname}-' prefix is very important to # limit prune's operation to this machine's archives and not apply to # other machine's archives also. diff --git a/fvl b/fvl index 4c4d757..d35b7c2 100755 --- a/fvl +++ b/fvl @@ -1,15 +1,11 @@ #!/bin/bash -videodir=/dat/video/vdr -vdrdb=/tmp/vdr.db - tofind=$1 -files=$(locate -d $vdrdb -i $1 | grep -v .rec) +cmd2nas=~/bin/cmd2nas.sh + +ls -l ~/bin/cmd2nas.sh + +$cmd2nas "/home/marc/bin/fvl '*$tofind*'" + -for f in $files; do - if [ -d $f ]; then - #echo $f - du -sh $f - fi -done diff --git a/syncauto.sh b/syncauto.sh index e2cd183..6d27a87 100644 --- a/syncauto.sh +++ b/syncauto.sh @@ -1,4 +1,5 @@ - -srcdir=/dat/audio/auto +srcdir=$1 +dstdir=$2 # sudo mount -o uid=marc /dev/sdt1 /media/hdext -rsync -a --no-o --no-p --no-g -L --modify-window 1 --stats --delete --progress $srcdir /media/hdext/ +rsync -a --no-o --no-p --no-g -L --modify-window 1 --stats --delete --progress $srcdir $dstdir +